diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/extent-tree.c | 29 | ||||
-rw-r--r-- | fs/btrfs/inode-map.c | 6 | ||||
-rw-r--r-- | fs/btrfs/transaction.c | 3 |
3 files changed, 13 insertions, 25 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 8fe517bd8521..7c233407beee 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c | |||
@@ -3363,8 +3363,7 @@ commit_trans: | |||
3363 | } | 3363 | } |
3364 | data_sinfo->bytes_may_use += bytes; | 3364 | data_sinfo->bytes_may_use += bytes; |
3365 | trace_btrfs_space_reservation(root->fs_info, "space_info", | 3365 | trace_btrfs_space_reservation(root->fs_info, "space_info", |
3366 | (u64)(unsigned long)data_sinfo, | 3366 | data_sinfo->flags, bytes, 1); |
3367 | bytes, 1); | ||
3368 | spin_unlock(&data_sinfo->lock); | 3367 | spin_unlock(&data_sinfo->lock); |
3369 | 3368 | ||
3370 | return 0; | 3369 | return 0; |
@@ -3385,8 +3384,7 @@ void btrfs_free_reserved_data_space(struct inode *inode, u64 bytes) | |||
3385 | spin_lock(&data_sinfo->lock); | 3384 | spin_lock(&data_sinfo->lock); |
3386 | data_sinfo->bytes_may_use -= bytes; | 3385 | data_sinfo->bytes_may_use -= bytes; |
3387 | trace_btrfs_space_reservation(root->fs_info, "space_info", | 3386 | trace_btrfs_space_reservation(root->fs_info, "space_info", |
3388 | (u64)(unsigned long)data_sinfo, | 3387 | data_sinfo->flags, bytes, 0); |
3389 | bytes, 0); | ||
3390 | spin_unlock(&data_sinfo->lock); | 3388 | spin_unlock(&data_sinfo->lock); |
3391 | } | 3389 | } |
3392 | 3390 | ||
@@ -3751,9 +3749,7 @@ again: | |||
3751 | if (used + orig_bytes <= space_info->total_bytes) { | 3749 | if (used + orig_bytes <= space_info->total_bytes) { |
3752 | space_info->bytes_may_use += orig_bytes; | 3750 | space_info->bytes_may_use += orig_bytes; |
3753 | trace_btrfs_space_reservation(root->fs_info, | 3751 | trace_btrfs_space_reservation(root->fs_info, |
3754 | "space_info", | 3752 | "space_info", space_info->flags, orig_bytes, 1); |
3755 | (u64)(unsigned long)space_info, | ||
3756 | orig_bytes, 1); | ||
3757 | ret = 0; | 3753 | ret = 0; |
3758 | } else { | 3754 | } else { |
3759 | /* | 3755 | /* |
@@ -3822,9 +3818,7 @@ again: | |||
3822 | if (used + num_bytes < space_info->total_bytes + avail) { | 3818 | if (used + num_bytes < space_info->total_bytes + avail) { |
3823 | space_info->bytes_may_use += orig_bytes; | 3819 | space_info->bytes_may_use += orig_bytes; |
3824 | trace_btrfs_space_reservation(root->fs_info, | 3820 | trace_btrfs_space_reservation(root->fs_info, |
3825 | "space_info", | 3821 | "space_info", space_info->flags, orig_bytes, 1); |
3826 | (u64)(unsigned long)space_info, | ||
3827 | orig_bytes, 1); | ||
3828 | ret = 0; | 3822 | ret = 0; |
3829 | } else { | 3823 | } else { |
3830 | wait_ordered = true; | 3824 | wait_ordered = true; |
@@ -3970,8 +3964,7 @@ static void block_rsv_release_bytes(struct btrfs_fs_info *fs_info, | |||
3970 | spin_lock(&space_info->lock); | 3964 | spin_lock(&space_info->lock); |
3971 | space_info->bytes_may_use -= num_bytes; | 3965 | space_info->bytes_may_use -= num_bytes; |
3972 | trace_btrfs_space_reservation(fs_info, "space_info", | 3966 | trace_btrfs_space_reservation(fs_info, "space_info", |
3973 | (u64)(unsigned long)space_info, | 3967 | space_info->flags, num_bytes, 0); |
3974 | num_bytes, 0); | ||
3975 | space_info->reservation_progress++; | 3968 | space_info->reservation_progress++; |
3976 | spin_unlock(&space_info->lock); | 3969 | spin_unlock(&space_info->lock); |
3977 | } | 3970 | } |
@@ -4189,14 +4182,14 @@ static void update_global_block_rsv(struct btrfs_fs_info *fs_info) | |||
4189 | block_rsv->reserved += num_bytes; | 4182 | block_rsv->reserved += num_bytes; |
4190 | sinfo->bytes_may_use += num_bytes; | 4183 | sinfo->bytes_may_use += num_bytes; |
4191 | trace_btrfs_space_reservation(fs_info, "space_info", | 4184 | trace_btrfs_space_reservation(fs_info, "space_info", |
4192 | (u64)(unsigned long)sinfo, num_bytes, 1); | 4185 | sinfo->flags, num_bytes, 1); |
4193 | } | 4186 | } |
4194 | 4187 | ||
4195 | if (block_rsv->reserved >= block_rsv->size) { | 4188 | if (block_rsv->reserved >= block_rsv->size) { |
4196 | num_bytes = block_rsv->reserved - block_rsv->size; | 4189 | num_bytes = block_rsv->reserved - block_rsv->size; |
4197 | sinfo->bytes_may_use -= num_bytes; | 4190 | sinfo->bytes_may_use -= num_bytes; |
4198 | trace_btrfs_space_reservation(fs_info, "space_info", | 4191 | trace_btrfs_space_reservation(fs_info, "space_info", |
4199 | (u64)(unsigned long)sinfo, num_bytes, 0); | 4192 | sinfo->flags, num_bytes, 0); |
4200 | sinfo->reservation_progress++; | 4193 | sinfo->reservation_progress++; |
4201 | block_rsv->reserved = block_rsv->size; | 4194 | block_rsv->reserved = block_rsv->size; |
4202 | block_rsv->full = 1; | 4195 | block_rsv->full = 1; |
@@ -4250,8 +4243,7 @@ void btrfs_trans_release_metadata(struct btrfs_trans_handle *trans, | |||
4250 | return; | 4243 | return; |
4251 | 4244 | ||
4252 | trace_btrfs_space_reservation(root->fs_info, "transaction", | 4245 | trace_btrfs_space_reservation(root->fs_info, "transaction", |
4253 | (u64)(unsigned long)trans, | 4246 | trans->transid, trans->bytes_reserved, 0); |
4254 | trans->bytes_reserved, 0); | ||
4255 | btrfs_block_rsv_release(root, trans->block_rsv, trans->bytes_reserved); | 4247 | btrfs_block_rsv_release(root, trans->block_rsv, trans->bytes_reserved); |
4256 | trans->bytes_reserved = 0; | 4248 | trans->bytes_reserved = 0; |
4257 | } | 4249 | } |
@@ -4770,9 +4762,8 @@ static int btrfs_update_reserved_bytes(struct btrfs_block_group_cache *cache, | |||
4770 | space_info->bytes_reserved += num_bytes; | 4762 | space_info->bytes_reserved += num_bytes; |
4771 | if (reserve == RESERVE_ALLOC) { | 4763 | if (reserve == RESERVE_ALLOC) { |
4772 | trace_btrfs_space_reservation(cache->fs_info, | 4764 | trace_btrfs_space_reservation(cache->fs_info, |
4773 | "space_info", | 4765 | "space_info", space_info->flags, |
4774 | (u64)(unsigned long)space_info, | 4766 | num_bytes, 0); |
4775 | num_bytes, 0); | ||
4776 | space_info->bytes_may_use -= num_bytes; | 4767 | space_info->bytes_may_use -= num_bytes; |
4777 | } | 4768 | } |
4778 | } | 4769 | } |
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; |
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index 63f835aa9788..8da29e8e4de1 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c | |||
@@ -337,8 +337,7 @@ again: | |||
337 | 337 | ||
338 | if (num_bytes) { | 338 | if (num_bytes) { |
339 | trace_btrfs_space_reservation(root->fs_info, "transaction", | 339 | trace_btrfs_space_reservation(root->fs_info, "transaction", |
340 | (u64)(unsigned long)h, | 340 | h->transid, num_bytes, 1); |
341 | num_bytes, 1); | ||
342 | h->block_rsv = &root->fs_info->trans_block_rsv; | 341 | h->block_rsv = &root->fs_info->trans_block_rsv; |
343 | h->bytes_reserved = num_bytes; | 342 | h->bytes_reserved = num_bytes; |
344 | } | 343 | } |