Linux-BTRFS Archive mirror
 help / color / mirror / Atom feed
From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH 2/4] btrfs-progs: cmds/qgroup: add qgroup_lookup::flags member
Date: Thu,  9 May 2024 18:42:31 +0930	[thread overview]
Message-ID: <4be206be0c707e60526f5de9edfa8ec9c435338b.1715245781.git.wqu@suse.com> (raw)
In-Reply-To: <cover.1715245781.git.wqu@suse.com>

This allows the users to identify if the running qgroup mode and whether
the numebrs are already inconsistent.

Signed-off-by: Qu Wenruo <wqu@suse.com>
---
 cmds/qgroup.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/cmds/qgroup.c b/cmds/qgroup.c
index 09eac0d2b36e..a023f0948180 100644
--- a/cmds/qgroup.c
+++ b/cmds/qgroup.c
@@ -65,6 +65,8 @@ struct btrfs_qgroup_list {
 };
 
 struct qgroup_lookup {
+	/* This matches btrfs_qgroup_status_item::flags. */
+	u64 flags;
 	struct rb_root root;
 };
 
@@ -1313,6 +1315,7 @@ static int __qgroups_search(int fd, struct btrfs_tree_search_args *args,
 			case BTRFS_QGROUP_STATUS_KEY:
 				si = btrfs_tree_search_data(args, off);
 				flags = btrfs_stack_qgroup_status_flags(si);
+				qgroup_lookup->flags = flags;
 
 				print_status_flag_warning(flags);
 				break;
-- 
2.45.0


  parent reply	other threads:[~2024-05-09  9:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-09  9:12 [PATCH 0/4] btrfs-progs: cmds/qgroup: enhance stale qgroups handling Qu Wenruo
2024-05-09  9:12 ` [PATCH 1/4] btrfs-progs: cmds/qgroup: sync the fs before doing qgroup search Qu Wenruo
2024-05-09  9:12 ` Qu Wenruo [this message]
2024-05-09  9:12 ` [PATCH 3/4] btrfs-progs: cmds/qgroup: handle stale qgroup deleteion more accurately Qu Wenruo
2024-05-09  9:12 ` [PATCH 4/4] btrfs-progs: cmds/qgroup: add more special status for qgroups Qu Wenruo
2024-05-17 16:15 ` [PATCH 0/4] btrfs-progs: cmds/qgroup: enhance stale qgroups handling David Sterba

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=4be206be0c707e60526f5de9edfa8ec9c435338b.1715245781.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).