local WDIR=$DIR/${tdir}o
local mdt_index
- local mdtdevname
local rc=0
mkdir -p $WDIR
mdt_index=$($LFS getstripe -M $WDIR)
mdt_index=$((mdt_index+1))
- mdtdevname=$(mdsdevname $mdt_index)
touch $WDIR/$tfile
- stop mds${mdt_index}
- start mds${mdt_index} $mdtdevname $MDS_MOUNT_OPTS ||
- error "mount mds${mdt_index} failed"
+
+ #fail mds will wait the failover finish then set
+ #following fail_loc to avoid interfer the recovery process.
+ fail mds${mdt_index}
#define OBD_FAIL_OSD_LMA_INCOMPAT 0x194
do_facet mds${mdt_index} lctl set_param fail_loc=0x194
run_test 102p "check setxattr(2) correctly fails without permission"
test_102q() {
+ [ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.6.92) ] &&
+ skip "MDS needs to be at least 2.6.92" && return
orphan_linkea_check $DIR/$tfile || error "orphan_linkea_check"
}
run_test 102q "flistxattr should not return trusted.link EAs for orphans"
test_102r() {
+ [ $(lustre_version_code $SINGLEMDS) -lt $(version_code 2.6.93) ] &&
+ skip "MDS needs to be at least 2.6.93" && return
touch $DIR/$tfile || error "touch"
setfattr -n user.$(basename $tfile) $DIR/$tfile || error "setfattr"
getfattr -n user.$(basename $tfile) $DIR/$tfile || error "getfattr"
rm $DIR/$tfile || error "rm"
+
+ #normal directory
+ mkdir -p $DIR/$tdir || error "mkdir"
+ setfattr -n user.$(basename $tdir) $DIR/$tdir || error "setfattr dir"
+ getfattr -n user.$(basename $tdir) $DIR/$tdir || error "getfattr dir"
+ setfattr -x user.$(basename $tdir) $DIR/$tdir ||
+ error "$testfile error deleting user.author1"
+ getfattr -d -m user.$(basename $tdir) 2> /dev/null |
+ grep "user.$(basename $tdir)" &&
+ error "$tdir did not delete user.$(basename $tdir)"
+ rmdir $DIR/$tdir || error "rmdir"
+
+ #striped directory
+ test_mkdir -p $DIR/$tdir || error "make striped dir"
+ setfattr -n user.$(basename $tdir) $DIR/$tdir || error "setfattr dir"
+ getfattr -n user.$(basename $tdir) $DIR/$tdir || error "getfattr dir"
+ setfattr -x user.$(basename $tdir) $DIR/$tdir ||
+ error "$testfile error deleting user.author1"
+ getfattr -d -m user.$(basename $tdir) 2> /dev/null |
+ grep "user.$(basename $tdir)" &&
+ error "$tdir did not delete user.$(basename $tdir)"
+ rmdir $DIR/$tdir || error "rm striped dir"
}
run_test 102r "set EAs with empty values"