Details
-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
None
-
None
-
3
-
9223372036854775807
Description
If a "lfs setquota" command is run on a mounted filesystem when a barrier_freeze has been placed, then subsequent barrier_freeze commands fail.
The issue seems to be in the mdt_quotactl where the order of the barrier apis are reversed - https://git.whamcloud.com/?p=fs/lustre-release.git;a=blob;f=lustre/mdt/mdt_handler.c;h=1feb91a1ca4157b61092f0e3db0dde2fd188c44d;hb=HEAD#l3361
The barrier_exit is called first and then a barrier entry is called. During a barrier_freeze, the barrier_exit succeeds, but the barrier_entry fails and causes the barrier counter to go negative.
The below sanity.sh test would help to recreate the issue
test_801d() { prep_801 # 180 seconds should be long enough do_facet mgs $LCTL barrier_freeze $FSNAME 60 b_status=$(barrier_stat) [ "$b_status" = "'frozen'" ] || error "(1) unexpected barrier status $b_status" $LFS setquota -u 1000 -i 10000 $DIR sleep 5 do_facet mgs $LCTL barrier_thaw $FSNAME b_status=$(barrier_stat) [ "$b_status" = "'thawed'" ] || error "(2) unexpected barrier status $b_status" # Should be able to freeze again do_facet mgs $LCTL barrier_freeze $FSNAME 30 b_status=$(barrier_stat) [ "$b_status" = "'frozen'" ] || error "(3) unexpected barrier status $b_status" do_facet mgs $LCTL barrier_thaw $FSNAME b_status=$(barrier_stat) [ "$b_status" = "'thawed'" ] || error "(2) unexpected barrier status $b_status" post_801 } run_test 801d "Barrier freeze with setquota"