test_85b of replay single sets a default striping on $DIR
and does not remove it. This makes it impossible to
correctly test self-extending layouts, so fix this first.
cray-bug-id: LUS-2528
Signed-off-by: Patrick Farrell <paf@cray.com>
Change-Id: I0057c8403e3dae2437cf0c8810af8086e2971c35
Reviewed-on: https://review.whamcloud.com/33777
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: Vitaly Fertman <c17818@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
run_test 85a "check the cancellation of unused locks during recovery(IBITS)"
test_85b() { #bug 16774
run_test 85a "check the cancellation of unused locks during recovery(IBITS)"
test_85b() { #bug 16774
+ rm -rf $DIR/$tdir
+ mkdir $DIR/$tdir
+
lctl set_param -n ldlm.cancel_unused_locks_before_replay "1"
if ! combined_mgs_mds ; then
mount_mgs_client
fi
lctl set_param -n ldlm.cancel_unused_locks_before_replay "1"
if ! combined_mgs_mds ; then
mount_mgs_client
fi
- create_pool $FSNAME.$TESTNAME ||
- error "unable to create pool $TESTNAME"
- do_facet mgs $LCTL pool_add $FSNAME.$TESTNAME $FSNAME-OST0000 ||
- error "unable to add pool $TESTNAME"
-
- $SETSTRIPE -c 1 -p $FSNAME.$TESTNAME $DIR
+ $LFS setstripe -c 1 -i 0 $DIR/$tdir
- dd if=/dev/urandom of=$DIR/$tfile-$i bs=4096 \
+ dd if=/dev/urandom of=$DIR/$tdir/$tfile-$i bs=4096 \
count=32 >/dev/null 2>&1
done
cancel_lru_locks osc
for i in $(seq 100); do
count=32 >/dev/null 2>&1
done
cancel_lru_locks osc
for i in $(seq 100); do
- dd if=$DIR/$tfile-$i of=/dev/null bs=4096 \
+ dd if=$DIR/$tdir/$tfile-$i of=/dev/null bs=4096 \
count=32 >/dev/null 2>&1
done
count=32 >/dev/null 2>&1
done
-n ldlm.namespaces.*OST0000*$addr.lock_unused_count)
echo "after recovery: unused locks count = $count2"
-n ldlm.namespaces.*OST0000*$addr.lock_unused_count)
echo "after recovery: unused locks count = $count2"
- do_facet mgs $LCTL pool_remove $FSNAME.$TESTNAME $FSNAME-OST0000 ||
- error "unable to remove pool $TESTNAME"
- do_facet mgs $LCTL pool_destroy $FSNAME.$TESTNAME ||
- error "unable to destroy the pool $TESTNAME"
-
if ! combined_mgs_mds ; then
umount_mgs_client
fi
if ! combined_mgs_mds ; then
umount_mgs_client
fi
if [ $count2 -ge $count ]; then
error "unused locks are not canceled"
fi
if [ $count2 -ge $count ]; then
error "unused locks are not canceled"
fi
}
run_test 85b "check the cancellation of unused locks during recovery(EXTENT)"
}
run_test 85b "check the cancellation of unused locks during recovery(EXTENT)"