From: adilger Date: Wed, 14 May 2008 22:24:22 +0000 (+0000) Subject: Branch b1_6 X-Git-Tag: v1_9_50~496 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=aa725876d2c2d0f8f08b7bc5f9242ef8b63033ca Branch b1_6 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 i=alex.zhuravlev b=15777 Sync ChangeLog from b_release_1_6_5. --- diff --git a/ldiskfs/ChangeLog b/ldiskfs/ChangeLog index a40d5be..4bfa9e0 100644 --- a/ldiskfs/ChangeLog +++ b/ldiskfs/ChangeLog @@ -30,6 +30,18 @@ Description: soft lockups on 1.6.2 MDS (is_subdir) Details : don't add dentries with ".." to dcache and ignore such dentries in iopen_lookup(). +Severity : critical +Frequency : very rare, if additional xattrs are used on kernels >= 2.6.12 +Bugzilla : 15777 +Description: files may lose file attributes in some cases +Details : If there are multiple extended attributes stored on the inode, + 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. If an additional attribute is 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 the attribute to be lost. + -------------------------------------------------------------------------------- 2008-01-11 Sun Microsystems, Inc. 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