From patchwork Thu Nov 27 04:56:45 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chandan Rajendra X-Patchwork-Id: 5391371 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7D0D2C11AC for ; Thu, 27 Nov 2014 04:57:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AC45B201C0 for ; Thu, 27 Nov 2014 04:57:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DAD4E200F3 for ; Thu, 27 Nov 2014 04:57:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753905AbaK0E5o (ORCPT ); Wed, 26 Nov 2014 23:57:44 -0500 Received: from e23smtp07.au.ibm.com ([202.81.31.140]:44982 "EHLO e23smtp07.au.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753858AbaK0E5n (ORCPT ); Wed, 26 Nov 2014 23:57:43 -0500 Received: from /spool/local by e23smtp07.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 27 Nov 2014 14:57:41 +1000 Received: from d23dlp01.au.ibm.com (202.81.31.203) by e23smtp07.au.ibm.com (202.81.31.204) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 27 Nov 2014 14:57:39 +1000 Received: from d23relay09.au.ibm.com (d23relay09.au.ibm.com [9.185.63.181]) by d23dlp01.au.ibm.com (Postfix) with ESMTP id 111682CE8065 for ; Thu, 27 Nov 2014 15:57:39 +1100 (EST) Received: from d23av03.au.ibm.com (d23av03.au.ibm.com [9.190.234.97]) by d23relay09.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id sAR4vU4X41156726 for ; Thu, 27 Nov 2014 15:57:38 +1100 Received: from d23av03.au.ibm.com (localhost [127.0.0.1]) by d23av03.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id sAR4v6HQ022721 for ; Thu, 27 Nov 2014 15:57:06 +1100 Received: from localhost.in.ibm.com ([9.124.35.120]) by d23av03.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id sAR4v5AW022473; Thu, 27 Nov 2014 15:57:05 +1100 From: Chandan Rajendra To: linux-btrfs@vger.kernel.org Cc: Chandan Rajendra Subject: [PATCH] Btrfs-progs: add_refs_for_implied: Use root_id instead of root_bytenr. Date: Thu, 27 Nov 2014 10:26:45 +0530 Message-Id: <1417064205-19040-1-git-send-email-chandan@linux.vnet.ibm.com> X-Mailer: git-send-email 2.1.0 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14112704-0025-0000-0000-000000981A81 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, RCVD_IN_DNSWL_HI, T_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 resolve_one_root() returns the objectid of a tree rather than the logical address of the root node. Hence using root_bytenr is misleading. Fix this. Signed-off-by: Chandan Rajendra --- qgroup-verify.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qgroup-verify.c b/qgroup-verify.c index c0c61d0..c98c751 100644 --- a/qgroup-verify.c +++ b/qgroup-verify.c @@ -553,11 +553,11 @@ static int add_refs_for_implied(struct btrfs_fs_info *info, u64 bytenr, struct tree_block *block) { int ret; - u64 root_bytenr = resolve_one_root(bytenr); + u64 root_id = resolve_one_root(bytenr); struct btrfs_root *root; struct btrfs_key key; - key.objectid = root_bytenr; + key.objectid = root_id; key.type = BTRFS_ROOT_ITEM_KEY; key.offset = (u64)-1;