path: root/libbtrfsutil/python/btrfsutilpy.h
diff options
authorOmar Sandoval <>2018-01-18 14:05:12 -0800
committerDavid Sterba <>2018-03-06 11:28:37 +0100
commit0b8512b7f5a6106efcab371471c472572a55367e (patch)
tree6434c263496a7cd4eb4fdefd219177002d2abdb8 /libbtrfsutil/python/btrfsutilpy.h
parente0d173c6c44d52287f2e20ec104cb3840e558343 (diff)
libbtrfsutil: add subvolume iterator helpers
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 traversal (useful for, e.g, recursive snapshot) and post-order traversal (useful for recursive delete). Signed-off-by: Omar Sandoval <> Signed-off-by: David Sterba <>
Diffstat (limited to 'libbtrfsutil/python/btrfsutilpy.h')
1 files changed, 1 insertions, 0 deletions
diff --git a/libbtrfsutil/python/btrfsutilpy.h b/libbtrfsutil/python/btrfsutilpy.h
index a56e41fc..79ac2eec 100644
--- a/libbtrfsutil/python/btrfsutilpy.h
+++ b/libbtrfsutil/python/btrfsutilpy.h
@@ -37,6 +37,7 @@ typedef struct {
extern PyTypeObject BtrfsUtilError_type;
extern PyStructSequence_Desc SubvolumeInfo_desc;
extern PyTypeObject SubvolumeInfo_type;
+extern PyTypeObject SubvolumeIterator_type;
extern PyTypeObject QgroupInherit_type;