]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
btrfs: tracepoints: Fix wrong parameter order for qgroup events
authorQu Wenruo <wqu@suse.com>
Thu, 17 Oct 2019 02:38:36 +0000 (10:38 +0800)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 12 Nov 2019 17:46:59 +0000 (18:46 +0100)
commit9483cf7bcbd3178ed698caac4b9894c172c280f3
tree919610faf40e0a22692a9e1c62477cfabedfa56b
parentd2c5a3c3b1410242b0f4b5c2bdae06a21d4a7d7b
btrfs: tracepoints: Fix wrong parameter order for qgroup events

BugLink: https://bugs.launchpad.net/bugs/1850456
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 <nborisov@suse.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Connor Kuehl <connor.kuehl@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
fs/btrfs/qgroup.c