From patchwork Thu Nov 1 15:01:26 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Schmidt X-Patchwork-Id: 1685301 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 05191DFE76 for ; Thu, 1 Nov 2012 15:01:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761843Ab2KAPBd (ORCPT ); Thu, 1 Nov 2012 11:01:33 -0400 Received: from xp-ob.rzone.de ([81.169.146.139]:50079 "EHLO xp-ob.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761791Ab2KAPBa (ORCPT ); Thu, 1 Nov 2012 11:01:30 -0400 X-RZG-CLASS-ID: xp Received: from pizpot.store ([192.168.43.236]) by josoe.store (josoe xp2) (RZmta 30.21 OK) with ESMTP id g06a20oA196atJ ; Thu, 1 Nov 2012 16:01:26 +0100 (CET) From: Jan Schmidt To: chris.mason@fusionio.com, linux-btrfs@vger.kernel.org Cc: ablock84@googlemail.com, sensille@gmx.net Subject: [PATCH 2/2] Btrfs-progs: bugfix for subvolume parent determination in btrfs send Date: Thu, 1 Nov 2012 16:01:26 +0100 Message-Id: <1351782086-23435-3-git-send-email-list.btrfs@jan-o-sch.net> X-Mailer: git-send-email 1.8.0 In-Reply-To: <1351782086-23435-1-git-send-email-list.btrfs@jan-o-sch.net> References: <1351782086-23435-1-git-send-email-list.btrfs@jan-o-sch.net> Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org 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 Reviewed-by: Alexander Block --- send-utils.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/send-utils.c b/send-utils.c index fcde5c2..d8d3972 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; }