Patch to fix the create-truncate meta data corruption problem reported
via bugzilla 253590 ... Wendy
Fix a nasty inode meta data corruption issue by keeping the buffer head in
icache array. This buffer needs to stay in memory until journal flush occurus.
Otherwise, gfs2_meta_inode_buffer could do a disk read before the inode hits
disk. It ends up with meta data corruptions. The buffer will be released as
part of the existing journal flush logic.
Signed-off-by: S. Wendy Cheng <[EMAIL PROTECTED]>
inode.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
--- gfs2-2.6-nmw/fs/gfs2/inode.c 2007-08-11 19:06:12.000000000 -0400
+++ linux/fs/gfs2/inode.c 2007-08-22 12:24:28.000000000 -0400
@@ -744,7 +744,7 @@ static void init_dinode(struct gfs2_inod
di->di_ctime_nsec = cpu_to_be32(tv.tv_nsec);
memset(&di->di_reserved, 0, sizeof(di->di_reserved));
- brelse(dibh);
+ dip->i_cache[0] = dibh;
}
static int make_dinode(struct gfs2_inode *dip, struct gfs2_glock *gl,