summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Schmidt <list.btrfs@jan-o-sch.net>2012-11-06 21:47:08 +0100
committerDavid Sterba <dsterba@suse.cz>2013-01-21 18:52:48 +0100
commitdb1b7f93b4818028d915ac3c98c0f621103bd3ba (patch)
tree17b8beb15ffa7d7429822d36c9318d9d13c1766c
parentcc088694ff51c715793c974fffa110bb44451a5e (diff)
Btrfs-progs: bugfix for subvolume parent determination in btrfs send
We missed to add the default subvolume, because it has no ROOT_BACKREF_ITEM. This made get_parent always fail for direct decendants of the default subvolume, resulting in lots of full streams where incremental streams were requested. Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net> Reviewed-by: Alexander Block <ablock84@googlemail.com>
-rw-r--r--send-utils.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/send-utils.c b/send-utils.c
index fcde5c28..d8d39728 100644
--- a/send-utils.c
+++ b/send-utils.c
@@ -240,7 +240,8 @@ int subvol_uuid_search_init(int mnt_fd, struct subvol_uuid_search *s)
memcpy(&root_item, root_item_ptr,
sizeof(root_item));
root_item_valid = 1;
- } else if (sh->type == BTRFS_ROOT_BACKREF_KEY) {
+ } else if (sh->type == BTRFS_ROOT_BACKREF_KEY ||
+ root_item_valid) {
if (!root_item_valid)
goto skip;
@@ -274,7 +275,6 @@ int subvol_uuid_search_init(int mnt_fd, struct subvol_uuid_search *s)
subvol_uuid_search_add(s, si);
root_item_valid = 0;
} else {
- root_item_valid = 0;
goto skip;
}