Re: [PATCH v2 11/27] libbtrfsutil: add subvolume iterator helpers

2018-02-23 Thread Omar Sandoval
On Fri, Feb 23, 2018 at 04:40:45PM +0900, Misono, Tomohiro wrote: > On 2018/02/16 4:04, Omar Sandoval wrote: > > From: Omar Sandoval > > > +PUBLIC enum btrfs_util_error btrfs_util_create_subvolume_iterator(const > > char *path, > > +

Re: [PATCH v2 11/27] libbtrfsutil: add subvolume iterator helpers

2018-02-22 Thread Misono, Tomohiro
On 2018/02/16 4:04, Omar Sandoval wrote: > From: Omar Sandoval > +PUBLIC enum btrfs_util_error btrfs_util_create_subvolume_iterator(const char > *path, > + uint64_t top, > +

[PATCH v2 11/27] libbtrfsutil: add subvolume iterator helpers

2018-02-15 Thread Omar Sandoval
From: Omar Sandoval This is how we can implement stuff like `btrfs subvol list`. Rather than producing the entire list upfront, the iterator approach uses less memory in the common case where the whole list is not stored (O(max subvolume path length)). It supports both pre-order