Skip to content

btrfs: qgroup: rescan related message minor fixes

Qu Wenruo linux-btrfs 3 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 3 repliesIn review
  2. v23 patches 0 repliesSuperseded
  3. v13 patches 0 repliesSuperseded

Changes in v3 from the cover letter

- Fix the @cancelled update
To handle the @stopped == false case better.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3btrfs: qgroup: handle the transaction commit error during rescanfs/btrfs/qgroup.c+8 -31 reply
2/3btrfs: qgroup: ensure the qgroup rescan messages are always shownfs/btrfs/qgroup.c+2 -41 reply
3/3btrfs: qgroup: show the "qgroup scan cancelled" message correctlyfs/btrfs/qgroup.c+16 -91 reply

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchFilipe Manana
1/3R-b
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/3] btrfs: qgroup: rescan related message minor fixes

[CHANGELOG]
v3:
- Fix the @cancelled update
To handle the @stopped == false case better.

v2:
- Handle cancelled-after-finished case better
So cancelled is only update when the rescan is stopped. This means if the rescan is finished properly then cancelled before we commit everything, at least we still treat the rescan as finished.

This is pointed by sashiko, but I won't handle it any further, as it's a long existing cancel-rescan race. I don't think it's that important either.

- Reorder the error messages priority
Now the failure has the highest priority.

The first one is from Sashiko.

The second one is to make sure we output the rescan related message even if we failed to start a transaction (e.g. transaction aborted).

The final one is to fix a bug that rescan cancelled message is never shown.

But the final one is also prone to race between scan and cancel. I don't think there is any good way to really fix that yet nor is really caused by this patch.

So I'll mostly ignore future scan-cancel race related review from sashiko on the last patch.

Qu Wenruo (3):
btrfs: qgroup: handle the transaction commit error during rescan
btrfs: qgroup: ensure the qgroup rescan messages are always shown
btrfs: qgroup: show the "qgroup scan cancelled" message correctly

 fs/btrfs/qgroup.c | 42 ++++++++++++++++++++++++++----------------
 1 file changed, 26 insertions(+), 16 deletions(-)
Signature · 1 line
2.56.0