From patchwork Sun Jan 12 13:38:31 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wang Shilong X-Patchwork-Id: 3472201 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C87AD9F2E9 for ; Sun, 12 Jan 2014 13:39:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 846FD20121 for ; Sun, 12 Jan 2014 13:39:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7E51720103 for ; Sun, 12 Jan 2014 13:39:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750952AbaALNil (ORCPT ); Sun, 12 Jan 2014 08:38:41 -0500 Received: from mail-pb0-f43.google.com ([209.85.160.43]:57644 "EHLO mail-pb0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750899AbaALNik (ORCPT ); Sun, 12 Jan 2014 08:38:40 -0500 Received: by mail-pb0-f43.google.com with SMTP id rq2so6269678pbb.30 for ; Sun, 12 Jan 2014 05:38:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id; bh=BY06QVOggSXFhNtMCS7EXWdVAZgUMFdOhoU+qI8LIjs=; b=0rUZI956yGz26LCyBO3kwdNiQTtBUO3K+/9QmFNALXBy68N1PA5GOMpXWHsNimA9Zx 7Q7iauZohiNo0f+G4e4BQh8ujRPCSkrVwUIz0yPNPTMxvCA7C5OWAfrLtQpJ95nMVzYQ pmZ8ncxilVwpijzRQA9USX9QIBwT8VzrUmDaCleUcKmIgp9q4Zj0LK/FtwnXcxUL9EgY 80195T5JMIrEN0D/DrV8vRpDsqF080mvBV12T3H62nsd9sbSYb3axW171OhkiCHJjsbv LKJxaaDZ9XsNtPf2o2rv40z1UYgAs9quHWPO9/jUigG1Z0azk3LL+peWux+6b/IYyEYv kQlw== X-Received: by 10.68.198.68 with SMTP id ja4mr23772733pbc.24.1389533919929; Sun, 12 Jan 2014 05:38:39 -0800 (PST) Received: from linux-b0ol.localdomain ([223.65.51.231]) by mx.google.com with ESMTPSA id jn12sm30944540pbd.37.2014.01.12.05.38.37 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 12 Jan 2014 05:38:39 -0800 (PST) From: Wang Shilong To: linux-btrfs@vger.kernel.org Subject: [PATCH] Btrfs: do not use extent commit root for sending Date: Sun, 12 Jan 2014 21:38:31 +0800 Message-Id: <1389533914-2272-1-git-send-email-wangshilong1991@gmail.com> X-Mailer: git-send-email 1.8.4 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Wang Shilong Now we have kicked off transaction from btrfs send, it is not safe that we use extent commit root to search. I happended to catch this problem when running sending and snapshot in my desktop. Signed-off-by: Wang Shilong --- fs/btrfs/send.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c index 591063d..e159df1 100644 --- a/fs/btrfs/send.c +++ b/fs/btrfs/send.c @@ -1225,7 +1225,7 @@ static int find_extent_clone(struct send_ctx *sctx, extent_item_pos = logical - found_key.objectid; ret = iterate_extent_inodes(sctx->send_root->fs_info, - found_key.objectid, extent_item_pos, 1, + found_key.objectid, extent_item_pos, 0, __iterate_backrefs, backref_ctx); if (ret < 0)