Whamcloud - gitweb
LU-3030 build: Update Master Copyrights pre 2.4 split
[fs/lustre-release.git] / lustre / obdclass / linux / linux-obdo.c
index fba728d..e5b17bc 100644 (file)
@@ -26,6 +26,8 @@
 /*
  * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
+ *
+ * Copyright (c) 2012, 2013, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -39,9 +41,6 @@
  */
 
 #define DEBUG_SUBSYSTEM S_CLASS
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
 
 #ifndef __KERNEL__
 #include <liblustre.h>
@@ -169,20 +168,12 @@ void obdo_refresh_inode(struct inode *dst, struct obdo *src, obd_flag valid)
                 LTIME_S(dst->i_ctime) = src->o_ctime;
         if (valid & OBD_MD_FLSIZE)
                 i_size_write(dst, src->o_size);
-        /* optimum IO size */
-        if (valid & OBD_MD_FLBLKSZ && src->o_blksize > (1 << dst->i_blkbits)) {
-                dst->i_blkbits = cfs_ffs(src->o_blksize) - 1;
-#ifdef HAVE_INODE_BLKSIZE
-                dst->i_blksize = src->o_blksize;
-#endif
-        }
+       /* optimum IO size */
+       if (valid & OBD_MD_FLBLKSZ && src->o_blksize > (1 << dst->i_blkbits))
+               dst->i_blkbits = ffs(src->o_blksize) - 1;
 
-        if (dst->i_blkbits < CFS_PAGE_SHIFT) {
-#ifdef HAVE_INODE_BLKSIZE
-                dst->i_blksize = CFS_PAGE_SIZE;
-#endif
-                dst->i_blkbits = CFS_PAGE_SHIFT;
-        }
+       if (dst->i_blkbits < CFS_PAGE_SHIFT)
+               dst->i_blkbits = CFS_PAGE_SHIFT;
 
         /* allocation of space */
         if (valid & OBD_MD_FLBLOCKS && src->o_blocks > dst->i_blocks)
@@ -198,10 +189,9 @@ void obdo_to_inode(struct inode *dst, struct obdo *src, obd_flag valid)
 {
         valid &= src->o_valid;
 
-        LASSERTF(!(valid & (OBD_MD_FLTYPE | OBD_MD_FLGENER | OBD_MD_FLFID |
-                            OBD_MD_FLID | OBD_MD_FLGROUP)),
-                 "object "LPU64"/"LPU64", valid %x\n",
-                 src->o_id, src->o_seq, valid);
+       LASSERTF(!(valid & (OBD_MD_FLTYPE | OBD_MD_FLGENER | OBD_MD_FLFID |
+                           OBD_MD_FLID | OBD_MD_FLGROUP)),
+                "object "DOSTID", valid %x\n", POSTID(&src->o_oi), valid);
 
         if (valid & (OBD_MD_FLCTIME | OBD_MD_FLMTIME))
                 CDEBUG(D_INODE,
@@ -223,12 +213,8 @@ void obdo_to_inode(struct inode *dst, struct obdo *src, obd_flag valid)
                         dst->i_blocks = -1;
 
         }
-        if (valid & OBD_MD_FLBLKSZ) {
-                dst->i_blkbits = cfs_ffs(src->o_blksize)-1;
-#ifdef HAVE_INODE_BLKSIZE
-                dst->i_blksize = src->o_blksize;
-#endif
-        }
+       if (valid & OBD_MD_FLBLKSZ)
+               dst->i_blkbits = ffs(src->o_blksize)-1;
         if (valid & OBD_MD_FLMODE)
                 dst->i_mode = (dst->i_mode & S_IFMT) | (src->o_mode & ~S_IFMT);
         if (valid & OBD_MD_FLUID)