Whamcloud - gitweb
Branch HEAD
authoryangsheng <yangsheng>
Thu, 7 Feb 2008 03:19:39 +0000 (03:19 +0000)
committeryangsheng <yangsheng>
Thu, 7 Feb 2008 03:19:39 +0000 (03:19 +0000)
b=14482
i=aidlger
i=umka

Add RHEL5 support to HEAD.

lustre/ChangeLog
lustre/include/linux/lustre_compat25.h
lustre/include/lu_object.h
lustre/kernel_patches/series/2.6-rhel5.series
lustre/llite/file.c
lustre/obdfilter/filter_lvb.c
lustre/osd/osd_handler.c
lustre/quota/quotacheck_test.c

index 7d0882a..4ab0808 100644 (file)
@@ -12,6 +12,10 @@ tbd  Sun Microsystems, Inc.
        * RHEL 4 and RHEL 5/SLES 10 clients behaves differently on 'cd' to a
         removed cwd "./" (refer to Bugzilla 14399).
 
+Severity   : enhancement
+Bugzilla   : 14482
+Description: Add rhel5 support to HEAD.
+
 Serverity  : enhancement
 Bugzilla   : 14793
 Description: Update RHEL4 kernel to 2.6.9-67.0.4.
@@ -23,10 +27,6 @@ Description: Don't allow skipping OSTs if index has been specified.
 Details    : Don't allow skipping OSTs if index has been specified, make locking
              in internal create lots better.
 
-Severity   : enhancement
-Bugzilla   : 14482
-Description: Add rhel5 support to HEAD.
-
 Severity   : normal
 Bugzilla   : 12228
 Description: LBUG in ptlrpc_check_set() bad phase ebc0de00
index 633b7b0..110d54f 100644 (file)
@@ -371,5 +371,12 @@ int ll_unregister_blkdev(unsigned int dev, const char *name)
 #define ll_invalidate_bdev(a,b)         invalidate_bdev((a))
 #endif
 
+#ifdef HAVE_INODE_BLKSIZE
+#define ll_inode_blksize(a)     (a)->i_blksize
+#else
+#define ll_inode_blksize(a)     (1<<(a)->i_blkbits)
+#endif
+
+
 #endif /* __KERNEL__ */
 #endif /* _COMPAT25_H */
index 9c070e6..50d7de4 100644 (file)
@@ -369,6 +369,7 @@ struct lu_attr {
         __u32          la_flags;  /* object flags */
         __u32          la_nlink;  /* number of persistent references to this
                                    * object */
+        __u32          la_blkbits; /* blk bits of the object*/
         __u32          la_blksize; /* blk size of the object*/
 
         __u32          la_rdev;   /* real device */
index 421296f..183d420 100644 (file)
@@ -10,3 +10,4 @@ export-show_task-2.6.18-vanilla.patch
 sd_iostats-2.6-rhel5.patch
 export_symbol_numa-2.6-fc5.patch
 jbd-stats-2.6-rhel5.patch
+export-nr_free_buffer_pages.patch
index 4ce948e..f21e44f 100644 (file)
@@ -692,9 +692,9 @@ int ll_inode_getattr(struct inode *inode, struct obdo *obdo)
                                  OBD_MD_FLCTIME | OBD_MD_FLSIZE);
 
         obdo_refresh_inode(inode, oinfo.oi_oa, oinfo.oi_oa->o_valid);
-        CDEBUG(D_INODE, "objid "LPX64" size %Lu, blocks %lu, blksize %lu\n",
+        CDEBUG(D_INODE, "objid "LPX64" size %Lu, blocks %llu, blksize %lu\n",
                lli->lli_smd->lsm_object_id, i_size_read(inode),
-               inode->i_blocks, inode->i_blksize);
+               (unsigned long long)inode->i_blocks, ll_inode_blksize(inode));
         RETURN(0);
 }
 
@@ -1222,8 +1222,8 @@ int ll_glimpse_size(struct inode *inode, int ast_flags)
 
         rc = ll_merge_lvb(inode);
 
-        CDEBUG(D_DLMTRACE, "glimpse: size: %llu, blocks: %lu\n",
-               i_size_read(inode), inode->i_blocks);
+        CDEBUG(D_DLMTRACE, "glimpse: size: %llu, blocks: %llu\n",
+               i_size_read(inode), (unsigned long long)inode->i_blocks);
 
         RETURN(rc);
 }
index 0ea45f1..a24175d 100644 (file)
@@ -207,8 +207,8 @@ static int filter_lvbo_update(struct ldlm_resource *res, struct lustre_msg *m,
         }
         if (lvb->lvb_blocks != dentry->d_inode->i_blocks) {
                 CDEBUG(D_DLMTRACE,"res: "LPU64" updating lvb blocks from disk: "
-                       LPU64" -> %lu\n", res->lr_name.name[0],
-                       lvb->lvb_blocks, dentry->d_inode->i_blocks);
+                       LPU64" -> %llu\n", res->lr_name.name[0],
+                       lvb->lvb_blocks, (unsigned long long)dentry->d_inode->i_blocks);
                 lvb->lvb_blocks = dentry->d_inode->i_blocks;
         }
 
index 06afd56..7324e27 100644 (file)
@@ -1084,8 +1084,6 @@ static void osd_inode_setattr(const struct lu_env *env,
                 inode->i_nlink  = attr->la_nlink;
         if (bits & LA_RDEV)
                 inode->i_rdev   = attr->la_rdev;
-        if (bits & LA_BLKSIZE)
-                inode->i_blksize = attr->la_blksize;
 
         if (bits & LA_FLAGS) {
                 struct ldiskfs_inode_info *li = LDISKFS_I(inode);
@@ -2488,7 +2486,8 @@ static void osd_inode_getattr(const struct lu_env *env,
         attr->la_flags      = LDISKFS_I(inode)->i_flags;
         attr->la_nlink      = inode->i_nlink;
         attr->la_rdev       = inode->i_rdev;
-        attr->la_blksize    = inode->i_blksize;
+        attr->la_blksize    = ll_inode_blksize(inode);
+        attr->la_blkbits    = inode->i_blkbits;
 }
 
 /*
index 35ce5f9..33b93cb 100644 (file)
@@ -85,9 +85,9 @@ static void print_inode(struct inode *inode)
             S_ISLNK(inode->i_mode))
                 size = inode_get_bytes(inode);
 
-         CERROR("%lu: uid: %u, size: %llu, blocks: %lu, real size: %llu\n",
+         CERROR("%lu: uid: %u, size: %llu, blocks: %llu, real size: %llu\n",
                 inode->i_ino, inode->i_uid, i_size_read(inode),
-                inode->i_blocks, size);
+                (unsigned long long)inode->i_blocks, size);
 }
 
 /* Test quotaon */