Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 297910
b: refs/heads/master
c: 2bcc032
h: refs/heads/master
v: v3
  • Loading branch information
Liu Bo authored and Chris Mason committed Mar 29, 2012
1 parent 68954f0 commit a4c6b76
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 26 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7ca4be45a0255ac8f08c05491c6add2dd87dd4f8
refs/heads/master: 2bcc0328c3a043880796a602c75fbeb1537aa1e1
29 changes: 10 additions & 19 deletions trunk/fs/btrfs/extent-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -3363,8 +3363,7 @@ int btrfs_check_data_free_space(struct inode *inode, u64 bytes)
}
data_sinfo->bytes_may_use += bytes;
trace_btrfs_space_reservation(root->fs_info, "space_info",
(u64)(unsigned long)data_sinfo,
bytes, 1);
data_sinfo->flags, bytes, 1);
spin_unlock(&data_sinfo->lock);

return 0;
Expand All @@ -3385,8 +3384,7 @@ void btrfs_free_reserved_data_space(struct inode *inode, u64 bytes)
spin_lock(&data_sinfo->lock);
data_sinfo->bytes_may_use -= bytes;
trace_btrfs_space_reservation(root->fs_info, "space_info",
(u64)(unsigned long)data_sinfo,
bytes, 0);
data_sinfo->flags, bytes, 0);
spin_unlock(&data_sinfo->lock);
}

Expand Down Expand Up @@ -3751,9 +3749,7 @@ static int reserve_metadata_bytes(struct btrfs_root *root,
if (used + orig_bytes <= space_info->total_bytes) {
space_info->bytes_may_use += orig_bytes;
trace_btrfs_space_reservation(root->fs_info,
"space_info",
(u64)(unsigned long)space_info,
orig_bytes, 1);
"space_info", space_info->flags, orig_bytes, 1);
ret = 0;
} else {
/*
Expand Down Expand Up @@ -3822,9 +3818,7 @@ static int reserve_metadata_bytes(struct btrfs_root *root,
if (used + num_bytes < space_info->total_bytes + avail) {
space_info->bytes_may_use += orig_bytes;
trace_btrfs_space_reservation(root->fs_info,
"space_info",
(u64)(unsigned long)space_info,
orig_bytes, 1);
"space_info", space_info->flags, orig_bytes, 1);
ret = 0;
} else {
wait_ordered = true;
Expand Down Expand Up @@ -3970,8 +3964,7 @@ static void block_rsv_release_bytes(struct btrfs_fs_info *fs_info,
spin_lock(&space_info->lock);
space_info->bytes_may_use -= num_bytes;
trace_btrfs_space_reservation(fs_info, "space_info",
(u64)(unsigned long)space_info,
num_bytes, 0);
space_info->flags, num_bytes, 0);
space_info->reservation_progress++;
spin_unlock(&space_info->lock);
}
Expand Down Expand Up @@ -4189,14 +4182,14 @@ static void update_global_block_rsv(struct btrfs_fs_info *fs_info)
block_rsv->reserved += num_bytes;
sinfo->bytes_may_use += num_bytes;
trace_btrfs_space_reservation(fs_info, "space_info",
(u64)(unsigned long)sinfo, num_bytes, 1);
sinfo->flags, num_bytes, 1);
}

if (block_rsv->reserved >= block_rsv->size) {
num_bytes = block_rsv->reserved - block_rsv->size;
sinfo->bytes_may_use -= num_bytes;
trace_btrfs_space_reservation(fs_info, "space_info",
(u64)(unsigned long)sinfo, num_bytes, 0);
sinfo->flags, num_bytes, 0);
sinfo->reservation_progress++;
block_rsv->reserved = block_rsv->size;
block_rsv->full = 1;
Expand Down Expand Up @@ -4250,8 +4243,7 @@ void btrfs_trans_release_metadata(struct btrfs_trans_handle *trans,
return;

trace_btrfs_space_reservation(root->fs_info, "transaction",
(u64)(unsigned long)trans,
trans->bytes_reserved, 0);
trans->transid, trans->bytes_reserved, 0);
btrfs_block_rsv_release(root, trans->block_rsv, trans->bytes_reserved);
trans->bytes_reserved = 0;
}
Expand Down Expand Up @@ -4770,9 +4762,8 @@ static int btrfs_update_reserved_bytes(struct btrfs_block_group_cache *cache,
space_info->bytes_reserved += num_bytes;
if (reserve == RESERVE_ALLOC) {
trace_btrfs_space_reservation(cache->fs_info,
"space_info",
(u64)(unsigned long)space_info,
num_bytes, 0);
"space_info", space_info->flags,
num_bytes, 0);
space_info->bytes_may_use -= num_bytes;
}
}
Expand Down
6 changes: 2 additions & 4 deletions trunk/fs/btrfs/inode-map.c
Original file line number Diff line number Diff line change
Expand Up @@ -439,8 +439,7 @@ int btrfs_save_ino_cache(struct btrfs_root *root,
if (ret)
goto out;
trace_btrfs_space_reservation(root->fs_info, "ino_cache",
(u64)(unsigned long)trans,
trans->bytes_reserved, 1);
trans->transid, trans->bytes_reserved, 1);
again:
inode = lookup_free_ino_inode(root, path);
if (IS_ERR(inode) && (PTR_ERR(inode) != -ENOENT || retry)) {
Expand Down Expand Up @@ -507,8 +506,7 @@ int btrfs_save_ino_cache(struct btrfs_root *root,
iput(inode);
out_release:
trace_btrfs_space_reservation(root->fs_info, "ino_cache",
(u64)(unsigned long)trans,
trans->bytes_reserved, 0);
trans->transid, trans->bytes_reserved, 0);
btrfs_block_rsv_release(root, trans->block_rsv, trans->bytes_reserved);
out:
trans->block_rsv = rsv;
Expand Down
3 changes: 1 addition & 2 deletions trunk/fs/btrfs/transaction.c
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,7 @@ static struct btrfs_trans_handle *start_transaction(struct btrfs_root *root,

if (num_bytes) {
trace_btrfs_space_reservation(root->fs_info, "transaction",
(u64)(unsigned long)h,
num_bytes, 1);
h->transid, num_bytes, 1);
h->block_rsv = &root->fs_info->trans_block_rsv;
h->bytes_reserved = num_bytes;
}
Expand Down

0 comments on commit a4c6b76

Please sign in to comment.