Skip to content

Commit a374292

Browse files
osandovmaharmstone
authored andcommitted
btrfs-progs: subvol list: use libbtrfsutil
btrfs subvol list has its own subvolume walking implementation that we can replace with a libbtrfsutil subvolume iterator. Most of the changed lines are removing the old implementation and mechanically updating the comparators, filters, and printers to use libbtrfsutil's subvolume info. The interesting parts are: 1. We can replace the red-black tree of subvolumes with an array that we qsort. 2. Listing deleted subvolumes needs a different codepath, but we don't need a filter for it anymore. 3. We need some hacks to maintain the weird path behavior documented in the previous commit. In addition to removing a bunch of redundant code, this also prepares us for allowing subvol list by unprivileged users in some cases. Signed-off-by: Omar Sandoval <[email protected]>
1 parent 31c7d5b commit a374292

File tree

1 file changed

+260
-709
lines changed

1 file changed

+260
-709
lines changed

0 commit comments

Comments
 (0)