From e8f46333d10b25bd0cd807529b48e8ae840d384d Mon Sep 17 00:00:00 2001 From: adilger Date: Tue, 13 May 2008 21:40:44 +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 --- lustre/ChangeLog | 25 +++++++++++++++++++------ lustre/tests/sanity.sh | 44 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+), 6 deletions(-) diff --git a/lustre/ChangeLog b/lustre/ChangeLog index e182fa9..3963f4a 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -5,18 +5,17 @@ 2.6.9-67.0.7.EL (RHEL 4), 2.6.16.54-0.2.5 (SLES 10), 2.6.18-53.1.14.el5 (RHEL 5), - 2.6.18.8 vanilla (kernel.org) 2.6.22.14 vanilla (kernel.org) * Client support for unpatched kernels: - (see http://wiki.lustre.org/index.php?title=Patchless_Client) - 2.6.16 - 2.6.22 vanilla (kernel.org) + (see http://wiki.lustre.org/index.php?title=Patchless_Client) + 2.6.16 - 2.6.22 vanilla (kernel.org) * Due to problems with nested symlinks and FMODE_EXEC (bug 12652), - we do not recommend using patchless RHEL4 clients with kernels - prior to 2.6.9-55EL (RHEL4U5). + we do not recommend using patchless RHEL4 clients with kernels + prior to 2.6.9-55EL (RHEL4U5). * Recommended e2fsprogs version: 1.40.7-sun1 * Note that reiserfs quotas are disabled on SLES 10 in this kernel. * RHEL 4 and RHEL 5/SLES 10 clients behaves differently on 'cd' to a - removed cwd "./" (refer to Bugzilla 14399). + removed cwd "./" (refer to Bugzilla 14399). * A new quota file format has been introduced in 1.6.5. The format conversion from prior releases is handled transparently, but releases older than 1.4.12/1.6.5 will not understand this new @@ -25,6 +24,20 @@ 'tunefs.lustre --param="mdt.quota_type=ug1" $MDTDEV'. For more information, please refer to bugzilla 13904. +Severity : critical +Frequency : very rare, if additional xattrs are used on kernels >= 2.6.12 +Bugzilla : 15777 +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. + Severity : minor Frequency : rare, only if {mds,oss}_num_threads is specified Bugzilla : 15759 diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 79c51be..d145aad 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -3812,6 +3812,50 @@ test_102g() { } run_test 102g "star copy files, keep osts ===========" +test_102h() { # bug 15777 + [ -z $(lctl get_param -n mdc.*.connect_flags | grep xattr) ] && + skip "must have user_xattr" && return + [ -z "$(which setfattr 2>/dev/null)" ] && + skip "could not find setfattr" && return + + XBIG=trusted.big + XSIZE=1024 + touch $DIR/$tfile + VALUE=datadatadatadatadatadatadatadata + while [ $(echo $VALUE | wc -c) -lt $XSIZE ]; do + VALUE="$VALUE$VALUE" + done + log "save $XBIG on $DIR/$tfile" + setfattr -n $XBIG -v "$VALUE" $DIR/$tfile || + error "saving $XBIG on $DIR/$tfile failed" + ORIG=$(getfattr -n $XBIG $DIR/$tfile 2> /dev/null | grep $XBIG) + OSIZE=$(echo $ORIG | wc -c) + [ $OSIZE -lt $XSIZE ] && error "set $XBIG too small ($OSIZE < $XSIZE)" + + XSML=trusted.sml + log "save $XSML on $DIR/$tfile" + setfattr -n $XSML -v val $DIR/$tfile || + error "saving $XSML on $DIR/$tfile failed" + NEW=$(getfattr -n $XBIG $DIR/$tfile 2> /dev/null | grep $XBIG) + if [ "$NEW" != "$ORIG" ]; then + log "orig: $ORIG" + log "new: $NEW" + error "$XBIG different after saving $XSML" + fi + + log "grow $XSML on $DIR/$tfile" + setfattr -n $XSML -v "$VALUE" $DIR/$tfile || + error "growing $XSML on $DIR/$tfile failed" + NEW=$(getfattr -n $XBIG $DIR/$tfile 2> /dev/null | grep $XBIG) + if [ "$NEW" != "$ORIG" ]; then + log "orig: $ORIG" + log "new: $NEW" + error "$XBIG different after growing $XSML" + fi + log "$XBIG still valid after growing $XSML" +} +run_test 102h "grow xattr from inside inode to external block" + run_acl_subtest() { $LUSTRE/tests/acl/run $LUSTRE/tests/acl/$1.test -- 1.8.3.1