Document of SubvolumeIterator says:
  SubvolumeIterator(path, top=0, info=False, post_order=False)
    -> new subvolume iterator
  ...
  top -- if not zero, instead of only listing subvolumes beneath the
  given path, list subvolumes beneath the subvolume with this ID; passing
  BTRFS_FS_TREE_OBJECTID (5) here lists all subvolumes. The subvolumes
  are listed relative to the subvolume with this ID.
  ...

So, change the default value of @top from 5 to 0 accordingly.

Signed-off-by: Tomohiro Misono <misono.tomoh...@jp.fujitsu.com>
---
 libbtrfsutil/python/subvolume.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libbtrfsutil/python/subvolume.c b/libbtrfsutil/python/subvolume.c
index 069e606b..6ecde1f6 100644
--- a/libbtrfsutil/python/subvolume.c
+++ b/libbtrfsutil/python/subvolume.c
@@ -525,7 +525,7 @@ static int SubvolumeIterator_init(SubvolumeIterator *self, 
PyObject *args,
        static char *keywords[] = {"path", "top", "info", "post_order", NULL};
        struct path_arg path = {.allow_fd = true};
        enum btrfs_util_error err;
-       unsigned long long top = 5;
+       unsigned long long top = 0;
        int info = 0;
        int post_order = 0;
        int flags = 0;
-- 
2.14.3


--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to