summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosef Bacik <jbacik@fb.com>2016-01-13 13:21:20 -0500
committerDavid Sterba <dsterba@suse.com>2016-02-18 11:22:41 +0100
commit88d3a5aaf6171d9a222961837ba329b850f140e3 (patch)
tree299737a955fc7d32f0edd0fdd8a16c60522fe677
parentdc95f7bfc57fa4b75a77d0da84d5db249d74aa3f (diff)
downloadop-kernel-dev-88d3a5aaf6171d9a222961837ba329b850f140e3.zip
op-kernel-dev-88d3a5aaf6171d9a222961837ba329b850f140e3.tar.gz
Btrfs: add transaction space reservation tracepoints
There are a few places where we add to trans->bytes_reserved but don't have the corresponding trace point. With these added my tool no longer sees transaction leaks. Signed-off-by: Josef Bacik <jbacik@fb.com> Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r--fs/btrfs/transaction.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
index b6031ce..e9e95ef 100644
--- a/fs/btrfs/transaction.c
+++ b/fs/btrfs/transaction.c
@@ -637,6 +637,8 @@ struct btrfs_trans_handle *btrfs_start_transaction_fallback_global_rsv(
trans->block_rsv = &root->fs_info->trans_block_rsv;
trans->bytes_reserved = num_bytes;
+ trace_btrfs_space_reservation(root->fs_info, "transaction",
+ trans->transid, num_bytes, 1);
return trans;
}
@@ -1375,7 +1377,9 @@ static noinline int create_pending_snapshot(struct btrfs_trans_handle *trans,
rsv = trans->block_rsv;
trans->block_rsv = &pending->block_rsv;
trans->bytes_reserved = trans->block_rsv->reserved;
-
+ trace_btrfs_space_reservation(root->fs_info, "transaction",
+ trans->transid,
+ trans->bytes_reserved, 1);
dentry = pending->dentry;
parent_inode = pending->dir;
parent_root = BTRFS_I(parent_inode)->root;
OpenPOWER on IntegriCloud