diff options
author | Liu Bo <liubo2009@cn.fujitsu.com> | 2012-03-29 09:57:44 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2012-03-29 09:57:44 -0400 |
commit | 2bcc0328c3a043880796a602c75fbeb1537aa1e1 (patch) | |
tree | ed18c3244abeda587b56498ca5da5609f3555d99 /fs/btrfs/inode-map.c | |
parent | 7ca4be45a0255ac8f08c05491c6add2dd87dd4f8 (diff) |
Btrfs: show useful info in space reservation tracepoint
o For space info, the type of space info is useful for debug.
o For transaction handle, its transid is useful.
Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/inode-map.c')
-rw-r--r-- | fs/btrfs/inode-map.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/btrfs/inode-map.c b/fs/btrfs/inode-map.c index 7ca46e6e11ae..b1a1c929ba80 100644 --- a/fs/btrfs/inode-map.c +++ b/fs/btrfs/inode-map.c | |||
@@ -439,8 +439,7 @@ int btrfs_save_ino_cache(struct btrfs_root *root, | |||
439 | if (ret) | 439 | if (ret) |
440 | goto out; | 440 | goto out; |
441 | trace_btrfs_space_reservation(root->fs_info, "ino_cache", | 441 | trace_btrfs_space_reservation(root->fs_info, "ino_cache", |
442 | (u64)(unsigned long)trans, | 442 | trans->transid, trans->bytes_reserved, 1); |
443 | trans->bytes_reserved, 1); | ||
444 | again: | 443 | again: |
445 | inode = lookup_free_ino_inode(root, path); | 444 | inode = lookup_free_ino_inode(root, path); |
446 | if (IS_ERR(inode) && (PTR_ERR(inode) != -ENOENT || retry)) { | 445 | if (IS_ERR(inode) && (PTR_ERR(inode) != -ENOENT || retry)) { |
@@ -507,8 +506,7 @@ out_put: | |||
507 | iput(inode); | 506 | iput(inode); |
508 | out_release: | 507 | out_release: |
509 | trace_btrfs_space_reservation(root->fs_info, "ino_cache", | 508 | trace_btrfs_space_reservation(root->fs_info, "ino_cache", |
510 | (u64)(unsigned long)trans, | 509 | trans->transid, trans->bytes_reserved, 0); |
511 | trans->bytes_reserved, 0); | ||
512 | btrfs_block_rsv_release(root, trans->block_rsv, trans->bytes_reserved); | 510 | btrfs_block_rsv_release(root, trans->block_rsv, trans->bytes_reserved); |
513 | out: | 511 | out: |
514 | trans->block_rsv = rsv; | 512 | trans->block_rsv = rsv; |