Patch fixes sanity-pfl test_10() to set root layout
properly: subdirectory could be mounted on $MOUNT if FILESET
is set, test now mounts root on $MOUNT2 for this case and
sets the root layout via $MOUNT2.
Test-Parameters: trivial testlist=sanity-pfl envdefinitions=ONLY=10
Signed-off-by: Elena Gryaznova <c17455@cray.com>
Cray-bug-id: 6557
Reviewed-by: Andriy Skulysh <c17819@cray.com>
Reviewed-by: Alexander Boyko <c17825@cray.com>
Change-Id: If94474d92686a37518c1dd51793e742967fdfbc1
Reviewed-on: https://review.whamcloud.com/33514
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
test_10() {
local parent=$DIR/$tdir
test_10() {
local parent=$DIR/$tdir
save_layout_restore_at_exit $MOUNT
rm -rf $parent
save_layout_restore_at_exit $MOUNT
rm -rf $parent
- $LFS setstripe -d $MOUNT || error "clear root layout"
+
+ # mount root on $MOUNT2 if FILESET is set
+ if [ -n "$FILESET" ]; then
+ FILESET="" mount_client $MOUNT2 ||
+ error "mount $MOUNT2 fail"
+ root=$MOUNT2
+ fi
+
+ $LFS setstripe -d $root || error "clear root layout"
# set root composite layout
$LFS setstripe -E 2M -c 1 -S 1M -E 16M -c2 -S 2M \
# set root composite layout
$LFS setstripe -E 2M -c 1 -S 1M -E 16M -c2 -S 2M \
- -E -1 -c 4 -S 4M $MOUNT ||
+ -E -1 -c 4 -S 4M $root ||
error "Set root layout failed"
error "Set root layout failed"
+ if [ "$root" == "$MOUNT2" ]; then
+ umount_client $MOUNT2 ||
+ error "umount $MOUNT2 fail"
+ fi
+
test_mkdir $parent
# set a different layout for parent
$LFS setstripe -E -1 -c 1 -S 1M $parent ||
test_mkdir $parent
# set a different layout for parent
$LFS setstripe -E -1 -c 1 -S 1M $parent ||