Whamcloud - gitweb
LU-16032 tests: restore delay_unlink_mb in sanity/360
authorAndreas Dilger <adilger@whamcloud.com>
Thu, 23 Nov 2023 22:56:00 +0000 (15:56 -0700)
committerAndreas Dilger <adilger@whamcloud.com>
Fri, 24 Nov 2023 09:26:03 +0000 (09:26 +0000)
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.

Lustre-change: https://review.whamcloud.com/53218
Lustre-commit: TBD (from 8fa0580fd64fe7cbe969817ece87a161c517c4c3)

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
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/53219
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/tests/sanity.sh

index 63154c1..6a02dcd 100755 (executable)
@@ -25141,7 +25141,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