Feature request: "btrfs qgroup show" should show path
The btrfs qgroup show command should show path assigned to each qgroup. This little piece of information would significantly helped when managing snapshots.
Example:
# btrfs qgroup show /
qgroupid rfer excl path
-------- ---- ---- -----
0/5 16.00KiB 16.00KiB /
0/257 1.57TiB 1.57TiB /home
Following script produces the desired output (not sure if correct, though):
#!/bin/sh
(btrfs subvolume list "$1" && btrfs qgroup show "$1") \
| awk '$1 == "ID" { p["0/"$2] = $9} $1 != "ID" { print $0 " " p[$1] }'
I also found few scripts doing this and a lot of question how to achieve this, but I think this feature should be integrated in btrfs-progs.
If no one else has already started this matter, maybe I can do it.
Thanks, it's yours.
I have posted the following patch to implement this feature. https://patchwork.kernel.org/patch/9995307/
Implemented since v6.0.1.