Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp2253758ybg; Sun, 27 Oct 2019 14:28:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqydnwhqU6FzY7sLLIOLx/2CdkuRoc5PGlIJmkhUMl16R7lbK6je3mXAumFhPvY5CanFlFVY X-Received: by 2002:a05:6402:1655:: with SMTP id s21mr10384996edx.140.1572211699368; Sun, 27 Oct 2019 14:28:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572211699; cv=none; d=google.com; s=arc-20160816; b=d3ZVr4z2BJ1Tbo7Z6rhQoZs1/puFJPFf9p8sTwjA/CHYNFcdXw2YPWXWFVIr6GBvd7 tpLF1z1jnUXH/Q+DgXxNBmtEMAnttlJYN2BLlLkKJ5QJg12B5j+tfd6lRnAhCZvuPni8 hhJ3G8W4hwWxz4u2R8QxtKfLaYlICcoNU+vQSuUv7p587BhIoMjOcoFoDBr5hTwH3YNj yrf0WZPmwqfPttI3umG4IrLcNvIit2c1w9WG3SJqawvxtHatb1fLAjGoQBcYYzIbDJn4 6qhYWsyEifZFpVzWOyAPxgTXSLVy6vxwkrmmslxR+RPmtjsDu+9cSZ6Vf5w9xYz6z74K ya6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=qj11Je+M7RfaStLYmmBrLYKAs7yPVFUJGoV7NQ/jMeg=; b=o6UUo75hGuiOAtLWK7dXFWGpYcFTevk8YguWezuSyjEL34pqj7P0mX3H4IHzwH7hX4 Jw1ib2QoYr6VpAFbDMQW2+f8K7SqJiCMcCpZkTkMbTZXkx/sl9zo8p7u7eD7ExXN8eSZ XOI8SUmZgTJKjdeGOoEnVU5IgxEa9KFIam0vJND5wvxMw7mWLCR7BRlxtS/UqTFDzZd2 TUCaCphqQzGC2oW/jL1AHbYD7aJrsNqMPoFvoLk2Dx9UtnKXxpySCjwf62j73fPPmeom cQwiasFz3Y2wtLz2OjP4rn1VDvD7F8Icey90cvg15rTkjMmgF5ceqU8ER2KEgsedg/Rl Qygw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=cqttyMcX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n16si1509605eja.192.2019.10.27.14.27.55; Sun, 27 Oct 2019 14:28:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=cqttyMcX; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732921AbfJ0V0Z (ORCPT + 99 others); Sun, 27 Oct 2019 17:26:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:48328 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732042AbfJ0V0X (ORCPT ); Sun, 27 Oct 2019 17:26:23 -0400 Received: from localhost (100.50.158.77.rev.sfr.net [77.158.50.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 38A3321D7F; Sun, 27 Oct 2019 21:26:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572211582; bh=uPIfQWqLKM5q170ciZ8ZKXKT3PTDtM1DUcLlUr0y/SE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cqttyMcXbjrAgY5pfRhLB0aJFA1k+movpN7+GmDlXNncBxhmhUhnXKr9tC2SHKWby Erp0vYe528cvR4s5hO+IxyhnotAB4c7HKXvrf76pAnzS/yoJtVLUWsGOuEwV0Q6dLF 9h532M/7RhEjYOZAPIdiRqsgYCW3449qk/nLRfOc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nikolay Borisov , Qu Wenruo , David Sterba Subject: [PATCH 5.3 186/197] btrfs: tracepoints: Fix wrong parameter order for qgroup events Date: Sun, 27 Oct 2019 22:01:44 +0100 Message-Id: <20191027203406.527183420@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191027203351.684916567@linuxfoundation.org> References: <20191027203351.684916567@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Qu Wenruo commit fd2b007eaec898564e269d1f478a2da0380ecf51 upstream. [BUG] For btrfs:qgroup_meta_reserve event, the trace event can output garbage: qgroup_meta_reserve: 9c7f6acc-b342-4037-bc47-7f6e4d2232d7: refroot=5(FS_TREE) type=DATA diff=2 The diff should always be alinged to sector size (4k), so there is definitely something wrong. [CAUSE] For the wrong @diff, it's caused by wrong parameter order. The correct parameters are: struct btrfs_root, s64 diff, int type. However the parameters used are: struct btrfs_root, int type, s64 diff. Fixes: 4ee0d8832c2e ("btrfs: qgroup: Update trace events for metadata reservation") CC: stable@vger.kernel.org # 4.19+ Reviewed-by: Nikolay Borisov Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba Signed-off-by: Greg Kroah-Hartman --- fs/btrfs/qgroup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/fs/btrfs/qgroup.c +++ b/fs/btrfs/qgroup.c @@ -3617,7 +3617,7 @@ int __btrfs_qgroup_reserve_meta(struct b return 0; BUG_ON(num_bytes != round_down(num_bytes, fs_info->nodesize)); - trace_qgroup_meta_reserve(root, type, (s64)num_bytes); + trace_qgroup_meta_reserve(root, (s64)num_bytes, type); ret = qgroup_reserve(root, num_bytes, enforce, type); if (ret < 0) return ret; @@ -3664,7 +3664,7 @@ void __btrfs_qgroup_free_meta(struct btr */ num_bytes = sub_root_meta_rsv(root, num_bytes, type); BUG_ON(num_bytes != round_down(num_bytes, fs_info->nodesize)); - trace_qgroup_meta_reserve(root, type, -(s64)num_bytes); + trace_qgroup_meta_reserve(root, -(s64)num_bytes, type); btrfs_qgroup_free_refroot(fs_info, root->root_key.objectid, num_bytes, type); }