summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/transaction.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2016-02-26 15:38:31 +0100
committerDavid Sterba <dsterba@suse.com>2016-02-26 15:38:31 +0100
commite9ddd77a31e6ba2867b9c33547f6f079d55f7a72 (patch)
tree3c2b40e73c989b49826b16e1294e95c01058e3e9 /fs/btrfs/transaction.c
parentMerge branch 'foreign/zhaolei/reada' into for-chris-4.6 (diff)
parentBtrfs: check reserved when deciding to background flush (diff)
downloadlinux-e9ddd77a31e6ba2867b9c33547f6f079d55f7a72.tar.xz
linux-e9ddd77a31e6ba2867b9c33547f6f079d55f7a72.zip
Merge branch 'foreign/josef/space-updates' into for-chris-4.6
Diffstat (limited to 'fs/btrfs/transaction.c')
-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 b6031ce474f7..e9e95ef0644f 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;