Commit 78a453a
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 <osandov@fb.com>1 parent d18d741 commit 78a453a
1 file changed
+260
-709
lines changed
0 commit comments