public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH 0/3] btrfs-progs: fix btrfs/249 failure
Date: Sat, 11 Feb 2023 19:50:29 +0800	[thread overview]
Message-ID: <cover.1676115988.git.wqu@suse.com> (raw)

Test case btrfs/249 fails from its introduction, as the fix is not
merged.

The root cause can be found in the first patch, which also introduced an
extra safe net to properly exclude the missing seed device.

However that safe net can only work with root privilege (as it goes
tree-search ioctl), that is good enough for the test case, but not the
best solution.

Instead a new kernel patch is introduced to expand the ability of dev
info ioctl (in a compatible way).

This patch would utilize that new member (and can fallback to the
tree-search if kernel doesn't support), so with newer kernel, fi-usage
can work without root privilege.

This patchset relies on the kernel patch titled:

  btrfs: ioctl: allow dev info ioctl to return fsid of a device

I really hope this won't cause extra delays, as the test case btrfs/249
is really causing too much hassle than it should.

Qu Wenruo (3):
  btrfs-progs: filesystem-usage: handle missing seed device properly
  btrfs-progs: sync ioctl from kernel
  btrfs-progs: filesystem-usage: use btrfs_ioctl_dev_info_args::fsid to
    determine if a device is seed

 cmds/filesystem-usage.c | 129 ++++++++++++++++++++++++++++++++++++----
 ioctl.h                 |  13 +++-
 libbtrfs/ioctl.h        |  13 +++-
 3 files changed, 141 insertions(+), 14 deletions(-)

-- 
2.39.1


             reply	other threads:[~2023-02-11 11:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-11 11:50 Qu Wenruo [this message]
2023-02-11 11:50 ` [PATCH 1/3] btrfs-progs: filesystem-usage: handle missing seed device properly Qu Wenruo
2023-03-16 15:25   ` David Sterba
2023-03-18  0:00     ` Qu Wenruo
2023-03-20 15:48       ` David Sterba
2023-02-11 11:50 ` [PATCH 2/3] btrfs-progs: sync ioctl from kernel Qu Wenruo
2023-03-16 15:27   ` David Sterba
2023-03-18  0:00     ` Qu Wenruo
2023-02-11 11:50 ` [PATCH 3/3] btrfs-progs: filesystem-usage: use btrfs_ioctl_dev_info_args::fsid to determine if a device is seed 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.1676115988.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