Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 287904
b: refs/heads/master
c: e77266e
h: refs/heads/master
v: v3
  • Loading branch information
Chris Mason committed Feb 24, 2012
1 parent 2193b1e commit c098115
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 21 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: 5500cdbe14d7435e04f66ff3cfb8ecd8b8e44ebf
refs/heads/master: e77266e4c4be6f9dc91bf688bce015a8babd5fe0
2 changes: 1 addition & 1 deletion trunk/fs/btrfs/check-integrity.c
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ static struct btrfsic_dev_state *btrfsic_dev_state_hashtable_lookup(
static int btrfsic_process_superblock(struct btrfsic_state *state,
struct btrfs_fs_devices *fs_devices)
{
int ret;
int ret = 0;
struct btrfs_super_block *selected_super;
struct list_head *dev_head = &fs_devices->devices;
struct btrfs_device *device;
Expand Down
35 changes: 19 additions & 16 deletions trunk/fs/btrfs/extent-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -3312,7 +3312,8 @@ 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)data_sinfo, bytes, 1);
(u64)(unsigned long)data_sinfo,
bytes, 1);
spin_unlock(&data_sinfo->lock);

return 0;
Expand All @@ -3333,7 +3334,8 @@ 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)data_sinfo, bytes, 0);
(u64)(unsigned long)data_sinfo,
bytes, 0);
spin_unlock(&data_sinfo->lock);
}

Expand Down Expand Up @@ -3698,9 +3700,9 @@ 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)space_info,
orig_bytes, 1);
"space_info",
(u64)(unsigned long)space_info,
orig_bytes, 1);
ret = 0;
} else {
/*
Expand Down Expand Up @@ -3769,9 +3771,9 @@ 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)space_info,
orig_bytes, 1);
"space_info",
(u64)(unsigned long)space_info,
orig_bytes, 1);
ret = 0;
} else {
wait_ordered = true;
Expand Down Expand Up @@ -3916,8 +3918,8 @@ 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)space_info,
num_bytes, 0);
(u64)(unsigned long)space_info,
num_bytes, 0);
space_info->reservation_progress++;
spin_unlock(&space_info->lock);
}
Expand Down Expand Up @@ -4135,14 +4137,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)sinfo, num_bytes, 1);
(u64)(unsigned long)sinfo, 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)sinfo, num_bytes, 0);
(u64)(unsigned long)sinfo, num_bytes, 0);
sinfo->reservation_progress++;
block_rsv->reserved = block_rsv->size;
block_rsv->full = 1;
Expand Down Expand Up @@ -4195,7 +4197,8 @@ void btrfs_trans_release_metadata(struct btrfs_trans_handle *trans,
if (!trans->bytes_reserved)
return;

trace_btrfs_space_reservation(root->fs_info, "transaction", (u64)trans,
trace_btrfs_space_reservation(root->fs_info, "transaction",
(u64)(unsigned long)trans,
trans->bytes_reserved, 0);
btrfs_block_rsv_release(root, trans->block_rsv, trans->bytes_reserved);
trans->bytes_reserved = 0;
Expand Down Expand Up @@ -4713,9 +4716,9 @@ 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)space_info,
num_bytes, 0);
"space_info",
(u64)(unsigned long)space_info,
num_bytes, 0);
space_info->bytes_may_use -= num_bytes;
}
}
Expand Down
6 changes: 4 additions & 2 deletions trunk/fs/btrfs/inode-map.c
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,8 @@ int btrfs_save_ino_cache(struct btrfs_root *root,
trans->bytes_reserved);
if (ret)
goto out;
trace_btrfs_space_reservation(root->fs_info, "ino_cache", (u64)trans,
trace_btrfs_space_reservation(root->fs_info, "ino_cache",
(u64)(unsigned long)trans,
trans->bytes_reserved, 1);
again:
inode = lookup_free_ino_inode(root, path);
Expand Down Expand Up @@ -500,7 +501,8 @@ int btrfs_save_ino_cache(struct btrfs_root *root,
out_put:
iput(inode);
out_release:
trace_btrfs_space_reservation(root->fs_info, "ino_cache", (u64)trans,
trace_btrfs_space_reservation(root->fs_info, "ino_cache",
(u64)(unsigned long)trans,
trans->bytes_reserved, 0);
btrfs_block_rsv_release(root, trans->block_rsv, trans->bytes_reserved);
out:
Expand Down
3 changes: 2 additions & 1 deletion trunk/fs/btrfs/transaction.c
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,8 @@ static struct btrfs_trans_handle *start_transaction(struct btrfs_root *root,

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

0 comments on commit c098115

Please sign in to comment.