From 2fb8018e64cca32793faf7a80c80f73bed0daa05 Mon Sep 17 00:00:00 2001 From: adilger Date: Tue, 13 May 2008 23:03:02 +0000 Subject: [PATCH] Branch b_release_1_6_5 Description: MDS may lose file striping (and hence file data) in some cases Details : If there are additional extended attributes stored on the MDS, in particular ACLs, SELinux, or user attributes (if user_xattr is specified for the client mount options) then there is a risk of attribute loss. Additionally, the Lustre file striping needs to be larger than default (e.g. striped over all OSTs), and an additional attribute must be stored initially in the inode and then increase in size enough to be moved to the external attribute block (e.g. ACL growing in size) for file data to be lost. i=kalpak.shah b=15777 --- ldiskfs/.cvsignore | 1 + .../patches/ext3-ea-expand-lose-block.patch | 27 ++++++++++++++++++++++ .../kernel_patches/series/ldiskfs-2.6-rhel5.series | 1 + .../series/ldiskfs-2.6-sles10.series | 1 + .../series/ldiskfs-2.6.18-vanilla.series | 1 + .../series/ldiskfs-2.6.22-vanilla.series | 1 + 6 files changed, 32 insertions(+) create mode 100644 ldiskfs/kernel_patches/patches/ext3-ea-expand-lose-block.patch diff --git a/ldiskfs/.cvsignore b/ldiskfs/.cvsignore index 5b47d43..f43ea81 100644 --- a/ldiskfs/.cvsignore +++ b/ldiskfs/.cvsignore @@ -17,4 +17,5 @@ lustre-ldiskfs-*.tar.gz lustre-ldiskfs.spec missing mkinstalldirs +Modules.symvers stamp-h1 diff --git a/ldiskfs/kernel_patches/patches/ext3-ea-expand-lose-block.patch b/ldiskfs/kernel_patches/patches/ext3-ea-expand-lose-block.patch new file mode 100644 index 0000000..d40b40d --- /dev/null +++ b/ldiskfs/kernel_patches/patches/ext3-ea-expand-lose-block.patch @@ -0,0 +1,27 @@ +Date: Mon, 12 May 2008 11:24:40 +0800 +From: Tiger Yang +Subject: [PATCH] ext3/4: fix uninitialized bs in ext3/4_xattr_set_handle() +To: linux-ext4@vger.kernel.org +Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org + +This fix the uninitialized bs when we try to replace a xattr entry in ibody +with the new value which require more than free space. + +Signed-off-by: Tiger Yang + + +diff --git a/fs/ext3/xattr.c b/fs/ext3/xattr.c +--- a/fs/ext3/xattr.c ++++ b/fs/ext3/xattr.c +@@ -1000,6 +1000,11 @@ ext3_xattr_set_handle(handle_t *handle, struct inode *inode, int name_index, + i.value = NULL; + error = ext3_xattr_block_set(handle, inode, &i, &bs); + } else if (error == -ENOSPC) { ++ if (EXT3_I(inode)->i_file_acl && !bs.s.base) { ++ error = ext3_xattr_block_find(inode, &i, &bs); ++ if (error) ++ goto cleanup; ++ } + error = ext3_xattr_block_set(handle, inode, &i, &bs); + if (error) + goto cleanup; diff --git a/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel5.series b/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel5.series index 163bf25..48c0813 100644 --- a/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel5.series +++ b/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel5.series @@ -13,6 +13,7 @@ ext3-filterdata-sles10.patch ext3-uninit-2.6.18.patch ext3-nanosecond-2.6.18-vanilla.patch ext3-inode-version-2.6.18-vanilla.patch +ext3-ea-expand-lose-block.patch ext3-mmp-2.6.18-vanilla.patch ext3-unlink-race.patch ext3-fiemap-2.6.18-vanilla.patch diff --git a/ldiskfs/kernel_patches/series/ldiskfs-2.6-sles10.series b/ldiskfs/kernel_patches/series/ldiskfs-2.6-sles10.series index aab3e71..32a431c 100644 --- a/ldiskfs/kernel_patches/series/ldiskfs-2.6-sles10.series +++ b/ldiskfs/kernel_patches/series/ldiskfs-2.6-sles10.series @@ -18,6 +18,7 @@ ext3-disable-write-bar-by-default-2.6-sles10.patch ext3-uninit-2.6-sles10.patch ext3-nanosecond-2.6-sles10.patch ext3-inode-version-2.6-sles10.patch +ext3-ea-expand-lose-block.patch ext3-mmp-2.6-sles10.patch ext3-fiemap-2.6-sles10.patch ext3-statfs-2.6-sles10.patch diff --git a/ldiskfs/kernel_patches/series/ldiskfs-2.6.18-vanilla.series b/ldiskfs/kernel_patches/series/ldiskfs-2.6.18-vanilla.series index 2fcdb48..4b1cdf5 100644 --- a/ldiskfs/kernel_patches/series/ldiskfs-2.6.18-vanilla.series +++ b/ldiskfs/kernel_patches/series/ldiskfs-2.6.18-vanilla.series @@ -14,6 +14,7 @@ ext3-16tb-overflow-fixes.patch ext3-uninit-2.6.18.patch ext3-nanosecond-2.6.18-vanilla.patch ext3-inode-version-2.6.18-vanilla.patch +ext3-ea-expand-lose-block.patch ext3-mmp-2.6.18-vanilla.patch ext3-handle-directory-corruption-better.patch ext3-fiemap-2.6.18-vanilla.patch diff --git a/ldiskfs/kernel_patches/series/ldiskfs-2.6.22-vanilla.series b/ldiskfs/kernel_patches/series/ldiskfs-2.6.22-vanilla.series index 5bf60dc..4ab651d 100644 --- a/ldiskfs/kernel_patches/series/ldiskfs-2.6.22-vanilla.series +++ b/ldiskfs/kernel_patches/series/ldiskfs-2.6.22-vanilla.series @@ -13,6 +13,7 @@ ext3-filterdata-sles10.patch ext3-uninit-2.6.22-vanilla.patch ext3-nanosecond-2.6.22-vanilla.patch ext3-inode-version-2.6.18-vanilla.patch +ext3-ea-expand-lose-block.patch ext3-mmp-2.6.22-vanilla.patch ext3-fiemap-2.6.22-vanilla.patch ext3-statfs-2.6.22.patch -- 1.8.3.1