From patchwork Tue Nov 6 20:47:08 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Schmidt X-Patchwork-Id: 1706781 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 545053FCF7 for ; Tue, 6 Nov 2012 20:47:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752637Ab2KFUrM (ORCPT ); Tue, 6 Nov 2012 15:47:12 -0500 Received: from xp-ob.rzone.de ([81.169.146.137]:12713 "EHLO xp-ob.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751546Ab2KFUrK (ORCPT ); Tue, 6 Nov 2012 15:47:10 -0500 X-RZG-CLASS-ID: xp Received: from pizpot.store ([192.168.43.236]) by joses.store (joses xp4) (RZmta 30.22 OK) with ESMTP id 60236coA6AsPMh ; Tue, 6 Nov 2012 21:47:08 +0100 (CET) From: Jan Schmidt To: chris.mason@fusionio.com, linux-btrfs@vger.kernel.org Cc: ablock84@googlemail.com, sensille@gmx.net Subject: [PATCH v2 2/2] Btrfs-progs: bugfix for subvolume parent determination in btrfs send Date: Tue, 6 Nov 2012 21:47:08 +0100 Message-Id: <1352234828-9446-3-git-send-email-list.btrfs@jan-o-sch.net> X-Mailer: git-send-email 1.8.0 In-Reply-To: <1352234828-9446-1-git-send-email-list.btrfs@jan-o-sch.net> References: <1352234828-9446-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; }