From patchwork Tue Jul 7 08:15:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qu Wenruo X-Patchwork-Id: 6731011 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E4F999F319 for ; Tue, 7 Jul 2015 08:18:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 233C720719 for ; Tue, 7 Jul 2015 08:18:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 34932206AF for ; Tue, 7 Jul 2015 08:18:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756575AbbGGIPu (ORCPT ); Tue, 7 Jul 2015 04:15:50 -0400 Received: from cn.fujitsu.com ([59.151.112.132]:55022 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1756509AbbGGIPe (ORCPT ); Tue, 7 Jul 2015 04:15:34 -0400 X-IronPort-AV: E=Sophos;i="5.13,665,1427731200"; d="scan'208";a="98162884" Received: from unknown (HELO edo.cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 07 Jul 2015 16:19:25 +0800 Received: from G08CNEXCHPEKD02.g08.fujitsu.local (localhost.localdomain [127.0.0.1]) by edo.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id t678DneH008521; Tue, 7 Jul 2015 16:13:50 +0800 Received: from localhost.localdomain (10.167.226.33) by G08CNEXCHPEKD02.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.181.6; Tue, 7 Jul 2015 16:15:31 +0800 From: Qu Wenruo To: CC: Subject: [PATCH 1/7] btrfs-progs: disk-io: Support commit transaction on chunk tree. Date: Tue, 7 Jul 2015 16:15:22 +0800 Message-ID: <1436256928-23812-2-git-send-email-quwenruo@cn.fujitsu.com> X-Mailer: git-send-email 2.4.4 In-Reply-To: <1436256928-23812-1-git-send-email-quwenruo@cn.fujitsu.com> References: <1436256928-23812-1-git-send-email-quwenruo@cn.fujitsu.com> MIME-Version: 1.0 X-Originating-IP: [10.167.226.33] Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, 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 As chunk tree is only stored in super block, chunk tree commit doesn't need to go through tree root update. Or a BUG_ON will be triggered. Signed-off-by: Qu Wenruo --- disk-io.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/disk-io.c b/disk-io.c index 6a53843..fdcfd6d 100644 --- a/disk-io.c +++ b/disk-io.c @@ -571,6 +571,8 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans, goto commit_tree; if (root == root->fs_info->tree_root) goto commit_tree; + if (root == root->fs_info->chunk_root) + goto commit_tree; free_extent_buffer(root->commit_root); root->commit_root = NULL;