Skip to content

btrfs-progs: fix btrfs/249 failure

Qu Wenruo linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3btrfs-progs: filesystem-usage: handle missing seed device properlycmds/filesystem-usage.c+107 -123 replies
2/3btrfs-progs: sync ioctl from kernelioctl.h libbtrfs/ioctl.h+24 -22 replies
3/3btrfs-progs: filesystem-usage: use btrfs_ioctl_dev_info_args::fsid to determine if a device is seedcmds/filesystem-usage.c+11 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] btrfs-progs: fix btrfs/249 failure

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(-)
Signature · 1 line
2.39.1