All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH v3 0/3] btrfs: qgroup: rescan related message minor fixes
Date: Fri, 20 Nov 2026 20:27:32 +1030	[thread overview]
Message-ID: <cover.1795168584.git.wqu@suse.com> (raw)

[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(-)

-- 
2.56.0


             reply	other threads:[~2026-11-20  9:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-20  9:57 Qu Wenruo [this message]
2026-11-20  9:57 ` [PATCH v3 1/3] btrfs: qgroup: handle the transaction commit error during rescan Qu Wenruo
2026-11-20  9:57 ` [PATCH v3 2/3] btrfs: qgroup: ensure the qgroup rescan messages are always shown Qu Wenruo
2026-11-20  9:57 ` [PATCH v3 3/3] btrfs: qgroup: show the "qgroup scan cancelled" message correctly Qu Wenruo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1795168584.git.wqu@suse.com \
    --to=wqu@suse.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.