From 57f0713d6abcba7fb792b6a7e3c3212fe28b7d2d Mon Sep 17 00:00:00 2001 From: alex Date: Fri, 16 Sep 2005 01:04:41 +0000 Subject: [PATCH] b=6866 r=adilger(original patch) Bad interaction between the ea-in-inode patch and the "no-read" code in the 2.6 kernel caused the inode and/or EA data not to be read from disk, causing single-file corruption. --- .../patches/ext3-ea-in-inode-2.6-fc3.patch | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/lustre/kernel_patches/patches/ext3-ea-in-inode-2.6-fc3.patch b/lustre/kernel_patches/patches/ext3-ea-in-inode-2.6-fc3.patch index 1fb0d6f..6f4d90c 100644 --- a/lustre/kernel_patches/patches/ext3-ea-in-inode-2.6-fc3.patch +++ b/lustre/kernel_patches/patches/ext3-ea-in-inode-2.6-fc3.patch @@ -34,6 +34,16 @@ Index: linux-2.6.10/fs/ext3/inode.c BUFFER_TRACE(bh, "call ext3_journal_dirty_metadata"); rc = ext3_journal_dirty_metadata(handle, bh); if (!err) +@@ -2875,6 +2875,7 @@ + { + int err = 0; + if (handle) { +- err = ext3_get_inode_loc(inode, iloc, 1); ++ err = ext3_get_inode_loc(inode, iloc, EXT3_I(inode)->i_state & ++ EXT3_STATE_NEW); + if (!err) { + BUFFER_TRACE(iloc->bh, "get_write_access"); + err = ext3_journal_get_write_access(handle, iloc->bh); Index: linux-2.6.10/fs/ext3/ialloc.c =================================================================== --- linux-2.6.10.orig/fs/ext3/ialloc.c 2005-03-31 20:12:28.734802760 +0800 @@ -113,7 +123,7 @@ Index: linux-2.6.10/fs/ext3/xattr.c + if (EXT3_SB(inode->i_sb)->s_inode_size <= EXT3_GOOD_OLD_INODE_SIZE) + return -ENOENT; + -+ ret = ext3_get_inode_loc(inode, &iloc, 1); ++ ret = ext3_get_inode_loc(inode, &iloc, 0); + if (ret) + return ret; + raw_inode = ext3_raw_inode(&iloc); @@ -252,7 +262,7 @@ Index: linux-2.6.10/fs/ext3/xattr.c + if (EXT3_SB(inode->i_sb)->s_inode_size <= EXT3_GOOD_OLD_INODE_SIZE) + return 0; + -+ ret = ext3_get_inode_loc(inode, &iloc, 1); ++ ret = ext3_get_inode_loc(inode, &iloc, 0); + if (ret) + return ret; + raw_inode = ext3_raw_inode(&iloc); @@ -399,7 +409,7 @@ Index: linux-2.6.10/fs/ext3/xattr.c + if (EXT3_SB(inode->i_sb)->s_inode_size <= EXT3_GOOD_OLD_INODE_SIZE) + return ret; + -+ err = ext3_get_inode_loc(inode, &iloc, 1); ++ err = ext3_get_inode_loc(inode, &iloc, 0); + if (err) + return -EIO; + raw_inode = ext3_raw_inode(&iloc); @@ -530,7 +540,7 @@ Index: linux-2.6.10/fs/ext3/xattr.c + if (EXT3_SB(inode->i_sb)->s_inode_size <= EXT3_GOOD_OLD_INODE_SIZE) + return -ENOSPC; + -+ err = ext3_get_inode_loc(inode, &iloc, 1); ++ err = ext3_get_inode_loc(inode, &iloc, 0); + if (err) + return err; + raw_inode = ext3_raw_inode(&iloc); -- 1.8.3.1