btrfs-progs: subvolume-list: add qgroup sizes output
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 3 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | btrfs-progs: separate root attributes into a dedicated structure from root_infocmds/ | +170 | 0 replies | |
| 2/3 | btrfs-progs: use root_attr structure to pass various attributescmds/ | +72 | 0 replies | |
| 3/3 | btrfs-progs: subvolume-list: output qgroup sizes for subvolumesDocumentation/ cmds/ | +150 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/3] btrfs-progs: subvolume-list: add qgroup sizes output
ZFS' management tool is way better received than btrfs-progs, one of the user-friendly point is the default zpool list, which includes the size of each subvolume.
I'm not sure how ZFS handles it, but for btrfs we need qgroups (or the faster but slightly less accurate squota) to get the accurate numbers.
But considering a lot of distro is enabling qgroup by default for exactly the same reason, and during the years qgroup itself is also under a lot of optimization, I believe adding sizes output for btrfs subvolume list is an overall benefit for end uesrs.
This patch would do exactly so, the output example is:
# ./btrfs subv list -t /mnt/btrfs/ ID gen top level rfer excl path -- --- --------- ---- ---- ---- 256 11 5 1064960 1064960 subvol1 257 11 5 4210688 4210688 subvol2
The extra columns are added depending on if qgroup is enabled, and we allow users to force such output, but if qgroup is not enabled and we're forced to output such sizes, a warning would be outputted and fill all the sizes value as 0.
Thanks William Brown for the UI suggestion.
Although there are still some pitfalls, mentioned in the last patch.
Qu Wenruo (3):
btrfs-progs: separate root attributes into a dedicated structure from
root_info
btrfs-progs: use root_attr structure to pass various attributes
btrfs-progs: subvolume-list: output qgroup sizes for subvolumes
Documentation/btrfs-subvolume.rst | 12 +- cmds/subvolume-list.c | 572 ++++++++++++++++++------------ 2 files changed, 349 insertions(+), 235 deletions(-)
--
2.42.1