diff options
author | Chris Mason <chris.mason@oracle.com> | 2012-02-24 10:39:05 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2012-02-24 10:39:05 -0500 |
commit | e77266e4c4be6f9dc91bf688bce015a8babd5fe0 (patch) | |
tree | 9ad1f7fa246188ac2f12088a8a1e354ffea63799 /fs/btrfs | |
parent | 5500cdbe14d7435e04f66ff3cfb8ecd8b8e44ebf (diff) |
Btrfs: fix compiler warnings on 32 bit systems
The enospc tracing code added some interesting uses of
u64 pointer casts.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/check-integrity.c | 2 | ||||
-rw-r--r-- | fs/btrfs/extent-tree.c | 35 | ||||
-rw-r--r-- | fs/btrfs/inode-map.c | 6 | ||||
-rw-r--r-- | fs/btrfs/transaction.c | 3 |
4 files changed, 26 insertions, 20 deletions
diff --git a/fs/btrfs/check-integrity.c b/fs/btrfs/check-integrity.c index b669a7d8e499..d986824bb2b4 100644 --- a/fs/btrfs/check-integrity.c +++ b/fs/btrfs/check-integrity.c | |||
@@ -644,7 +644,7 @@ static struct btrfsic_dev_state *btrfsic_dev_state_hashtable_lookup( | |||
644 | static int btrfsic_process_superblock(struct btrfsic_state *state, | 644 | static int btrfsic_process_superblock(struct btrfsic_state *state, |
645 | struct btrfs_fs_devices *fs_devices) | 645 | struct btrfs_fs_devices *fs_devices) |
646 | { | 646 | { |
647 | int ret; | 647 | int ret = 0; |
648 | struct btrfs_super_block *selected_super; | 648 | struct btrfs_super_block *selected_super; |
649 | struct list_head *dev_head = &fs_devices->devices; | 649 | struct list_head *dev_head = &fs_devices->devices; |
650 | struct btrfs_device *device; | 650 | struct btrfs_device *device; |
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 079e5a1c343c..37e0a800d34e 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c | |||
@@ -3312,7 +3312,8 @@ commit_trans: | |||
3312 | } | 3312 | } |
3313 | data_sinfo->bytes_may_use += bytes; | 3313 | data_sinfo->bytes_may_use += bytes; |
3314 | trace_btrfs_space_reservation(root->fs_info, "space_info", | 3314 | trace_btrfs_space_reservation(root->fs_info, "space_info", |
3315 | (u64)data_sinfo, bytes, 1); | 3315 | (u64)(unsigned long)data_sinfo, |
3316 | bytes, 1); | ||
3316 | spin_unlock(&data_sinfo->lock); | 3317 | spin_unlock(&data_sinfo->lock); |
3317 | 3318 | ||
3318 | return 0; | 3319 | return 0; |
@@ -3333,7 +3334,8 @@ void btrfs_free_reserved_data_space(struct inode *inode, u64 bytes) | |||
3333 | spin_lock(&data_sinfo->lock); | 3334 | spin_lock(&data_sinfo->lock); |
3334 | data_sinfo->bytes_may_use -= bytes; | 3335 | data_sinfo->bytes_may_use -= bytes; |
3335 | trace_btrfs_space_reservation(root->fs_info, "space_info", | 3336 | trace_btrfs_space_reservation(root->fs_info, "space_info", |
3336 | (u64)data_sinfo, bytes, 0); | 3337 | (u64)(unsigned long)data_sinfo, |
3338 | bytes, 0); | ||
3337 | spin_unlock(&data_sinfo->lock); | 3339 | spin_unlock(&data_sinfo->lock); |
3338 | } | 3340 | } |
3339 | 3341 | ||
@@ -3698,9 +3700,9 @@ again: | |||
3698 | if (used + orig_bytes <= space_info->total_bytes) { | 3700 | if (used + orig_bytes <= space_info->total_bytes) { |
3699 | space_info->bytes_may_use += orig_bytes; | 3701 | space_info->bytes_may_use += orig_bytes; |
3700 | trace_btrfs_space_reservation(root->fs_info, | 3702 | trace_btrfs_space_reservation(root->fs_info, |
3701 | "space_info", | 3703 | "space_info", |
3702 | (u64)space_info, | 3704 | (u64)(unsigned long)space_info, |
3703 | orig_bytes, 1); | 3705 | orig_bytes, 1); |
3704 | ret = 0; | 3706 | ret = 0; |
3705 | } else { | 3707 | } else { |
3706 | /* | 3708 | /* |
@@ -3769,9 +3771,9 @@ again: | |||
3769 | if (used + num_bytes < space_info->total_bytes + avail) { | 3771 | if (used + num_bytes < space_info->total_bytes + avail) { |
3770 | space_info->bytes_may_use += orig_bytes; | 3772 | space_info->bytes_may_use += orig_bytes; |
3771 | trace_btrfs_space_reservation(root->fs_info, | 3773 | trace_btrfs_space_reservation(root->fs_info, |
3772 | "space_info", | 3774 | "space_info", |
3773 | (u64)space_info, | 3775 | (u64)(unsigned long)space_info, |
3774 | orig_bytes, 1); | 3776 | orig_bytes, 1); |
3775 | ret = 0; | 3777 | ret = 0; |
3776 | } else { | 3778 | } else { |
3777 | wait_ordered = true; | 3779 | wait_ordered = true; |
@@ -3916,8 +3918,8 @@ static void block_rsv_release_bytes(struct btrfs_fs_info *fs_info, | |||
3916 | spin_lock(&space_info->lock); | 3918 | spin_lock(&space_info->lock); |
3917 | space_info->bytes_may_use -= num_bytes; | 3919 | space_info->bytes_may_use -= num_bytes; |
3918 | trace_btrfs_space_reservation(fs_info, "space_info", | 3920 | trace_btrfs_space_reservation(fs_info, "space_info", |
3919 | (u64)space_info, | 3921 | (u64)(unsigned long)space_info, |
3920 | num_bytes, 0); | 3922 | num_bytes, 0); |
3921 | space_info->reservation_progress++; | 3923 | space_info->reservation_progress++; |
3922 | spin_unlock(&space_info->lock); | 3924 | spin_unlock(&space_info->lock); |
3923 | } | 3925 | } |
@@ -4135,14 +4137,14 @@ static void update_global_block_rsv(struct btrfs_fs_info *fs_info) | |||
4135 | block_rsv->reserved += num_bytes; | 4137 | block_rsv->reserved += num_bytes; |
4136 | sinfo->bytes_may_use += num_bytes; | 4138 | sinfo->bytes_may_use += num_bytes; |
4137 | trace_btrfs_space_reservation(fs_info, "space_info", | 4139 | trace_btrfs_space_reservation(fs_info, "space_info", |
4138 | (u64)sinfo, num_bytes, 1); | 4140 | (u64)(unsigned long)sinfo, num_bytes, 1); |
4139 | } | 4141 | } |
4140 | 4142 | ||
4141 | if (block_rsv->reserved >= block_rsv->size) { | 4143 | if (block_rsv->reserved >= block_rsv->size) { |
4142 | num_bytes = block_rsv->reserved - block_rsv->size; | 4144 | num_bytes = block_rsv->reserved - block_rsv->size; |
4143 | sinfo->bytes_may_use -= num_bytes; | 4145 | sinfo->bytes_may_use -= num_bytes; |
4144 | trace_btrfs_space_reservation(fs_info, "space_info", | 4146 | trace_btrfs_space_reservation(fs_info, "space_info", |
4145 | (u64)sinfo, num_bytes, 0); | 4147 | (u64)(unsigned long)sinfo, num_bytes, 0); |
4146 | sinfo->reservation_progress++; | 4148 | sinfo->reservation_progress++; |
4147 | block_rsv->reserved = block_rsv->size; | 4149 | block_rsv->reserved = block_rsv->size; |
4148 | block_rsv->full = 1; | 4150 | block_rsv->full = 1; |
@@ -4195,7 +4197,8 @@ void btrfs_trans_release_metadata(struct btrfs_trans_handle *trans, | |||
4195 | if (!trans->bytes_reserved) | 4197 | if (!trans->bytes_reserved) |
4196 | return; | 4198 | return; |
4197 | 4199 | ||
4198 | trace_btrfs_space_reservation(root->fs_info, "transaction", (u64)trans, | 4200 | trace_btrfs_space_reservation(root->fs_info, "transaction", |
4201 | (u64)(unsigned long)trans, | ||
4199 | trans->bytes_reserved, 0); | 4202 | trans->bytes_reserved, 0); |
4200 | btrfs_block_rsv_release(root, trans->block_rsv, trans->bytes_reserved); | 4203 | btrfs_block_rsv_release(root, trans->block_rsv, trans->bytes_reserved); |
4201 | trans->bytes_reserved = 0; | 4204 | trans->bytes_reserved = 0; |
@@ -4713,9 +4716,9 @@ static int btrfs_update_reserved_bytes(struct btrfs_block_group_cache *cache, | |||
4713 | space_info->bytes_reserved += num_bytes; | 4716 | space_info->bytes_reserved += num_bytes; |
4714 | if (reserve == RESERVE_ALLOC) { | 4717 | if (reserve == RESERVE_ALLOC) { |
4715 | trace_btrfs_space_reservation(cache->fs_info, | 4718 | trace_btrfs_space_reservation(cache->fs_info, |
4716 | "space_info", | 4719 | "space_info", |
4717 | (u64)space_info, | 4720 | (u64)(unsigned long)space_info, |
4718 | num_bytes, 0); | 4721 | num_bytes, 0); |
4719 | space_info->bytes_may_use -= num_bytes; | 4722 | space_info->bytes_may_use -= num_bytes; |
4720 | } | 4723 | } |
4721 | } | 4724 | } |
diff --git a/fs/btrfs/inode-map.c b/fs/btrfs/inode-map.c index 213ffa86ce1b..ee15d88b33d2 100644 --- a/fs/btrfs/inode-map.c +++ b/fs/btrfs/inode-map.c | |||
@@ -438,7 +438,8 @@ int btrfs_save_ino_cache(struct btrfs_root *root, | |||
438 | trans->bytes_reserved); | 438 | trans->bytes_reserved); |
439 | if (ret) | 439 | if (ret) |
440 | goto out; | 440 | goto out; |
441 | trace_btrfs_space_reservation(root->fs_info, "ino_cache", (u64)trans, | 441 | trace_btrfs_space_reservation(root->fs_info, "ino_cache", |
442 | (u64)(unsigned long)trans, | ||
442 | trans->bytes_reserved, 1); | 443 | trans->bytes_reserved, 1); |
443 | again: | 444 | again: |
444 | inode = lookup_free_ino_inode(root, path); | 445 | inode = lookup_free_ino_inode(root, path); |
@@ -500,7 +501,8 @@ again: | |||
500 | out_put: | 501 | out_put: |
501 | iput(inode); | 502 | iput(inode); |
502 | out_release: | 503 | out_release: |
503 | trace_btrfs_space_reservation(root->fs_info, "ino_cache", (u64)trans, | 504 | trace_btrfs_space_reservation(root->fs_info, "ino_cache", |
505 | (u64)(unsigned long)trans, | ||
504 | trans->bytes_reserved, 0); | 506 | trans->bytes_reserved, 0); |
505 | btrfs_block_rsv_release(root, trans->block_rsv, trans->bytes_reserved); | 507 | btrfs_block_rsv_release(root, trans->block_rsv, trans->bytes_reserved); |
506 | out: | 508 | out: |
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index 016977beee5c..04b77e3ceb7a 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c | |||
@@ -327,7 +327,8 @@ again: | |||
327 | 327 | ||
328 | if (num_bytes) { | 328 | if (num_bytes) { |
329 | trace_btrfs_space_reservation(root->fs_info, "transaction", | 329 | trace_btrfs_space_reservation(root->fs_info, "transaction", |
330 | (u64)h, num_bytes, 1); | 330 | (u64)(unsigned long)h, |
331 | num_bytes, 1); | ||
331 | h->block_rsv = &root->fs_info->trans_block_rsv; | 332 | h->block_rsv = &root->fs_info->trans_block_rsv; |
332 | h->bytes_reserved = num_bytes; | 333 | h->bytes_reserved = num_bytes; |
333 | } | 334 | } |