Whamcloud - gitweb
LU-16032 tests: restore delay_unlink_mb in sanity/360 18/53218/1
authorAndreas Dilger <adilger@whamcloud.com>
Thu, 23 Nov 2023 22:56:00 +0000 (15:56 -0700)
committerAndreas Dilger <adilger@whamcloud.com>
Thu, 23 Nov 2023 22:56:00 +0000 (15:56 -0700)
Restore the original value of osd-ldiskfs.*.delay_unlink_mb after
sanity test_360 is finished, so that it doesn't have an impact on
later tests running, in particular sanity-quota.sh was seeing some
delay in freeing quota for files that were just deleted.

Test-Parameters: trivial testlist=sanity-quota
Fixes: a772e90243 ("LU-16032 osd: move unlink of large objects to separate thread")
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I7c1ab02262afdef2fc51f9fbc3932d954a4f8304

lustre/tests/sanity.sh

index d7b09bd..d24a6d5 100755 (executable)
@@ -26571,7 +26571,11 @@ test_360() {
        [[ "$ost1_FSTYPE" == "ldiskfs" ]] || skip "ldiskfs only test"
 
        check_set_fallocate_or_skip
-       do_facet ost1 "$LCTL set_param osd-ldiskfs.delayed_unlink_mb=1MiB"
+       local param="osd-ldiskfs.delayed_unlink_mb"
+       local old=($(do_facet ost1 "$LCTL get_param -n $param"))
+
+       do_facet ost1 "$LCTL set_param $param=1MiB"
+       stack_trap "do_facet ost1 $LCTL set_param $param=${old[0]}"
 
        mkdir $DIR/$tdir/
        do_facet ost1 $LCTL set_param debug=+inode