diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2007-10-19 09:22:59 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-09-25 11:03:57 -0400 |
commit | ae2f5411c4ce7180cca8418853db50c8e52d40db (patch) | |
tree | f169f0dfa6a13781dbf27baa4e283a0cc509e07d /fs/btrfs | |
parent | 44b36eb20bb60d7da1375c1fb45784740a4dc358 (diff) |
btrfs: 32-bit type problems
An assorted set of casts to get rid of the warnings on 32-bit archs.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/ctree.c | 2 | ||||
-rw-r--r-- | fs/btrfs/extent-tree.c | 8 | ||||
-rw-r--r-- | fs/btrfs/extent_map.c | 6 | ||||
-rw-r--r-- | fs/btrfs/file.c | 2 | ||||
-rw-r--r-- | fs/btrfs/inode.c | 2 |
5 files changed, 10 insertions, 10 deletions
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index 54967099a8eb..17a322663f3b 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c | |||
@@ -1389,7 +1389,7 @@ int btrfs_leaf_free_space(struct btrfs_root *root, struct extent_buffer *leaf) | |||
1389 | ret = BTRFS_LEAF_DATA_SIZE(root) - leaf_space_used(leaf, 0, nritems); | 1389 | ret = BTRFS_LEAF_DATA_SIZE(root) - leaf_space_used(leaf, 0, nritems); |
1390 | if (ret < 0) { | 1390 | if (ret < 0) { |
1391 | printk("leaf free space ret %d, leaf data size %lu, used %d nritems %d\n", | 1391 | printk("leaf free space ret %d, leaf data size %lu, used %d nritems %d\n", |
1392 | ret, BTRFS_LEAF_DATA_SIZE(root), | 1392 | ret, (unsigned long) BTRFS_LEAF_DATA_SIZE(root), |
1393 | leaf_space_used(leaf, 0, nritems), nritems); | 1393 | leaf_space_used(leaf, 0, nritems), nritems); |
1394 | } | 1394 | } |
1395 | return ret; | 1395 | return ret; |
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 6b2f2b414fa1..7de7707d939c 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c | |||
@@ -149,7 +149,7 @@ struct btrfs_block_group_cache *btrfs_lookup_block_group(struct | |||
149 | if (ret) | 149 | if (ret) |
150 | return NULL; | 150 | return NULL; |
151 | 151 | ||
152 | block_group = (struct btrfs_block_group_cache *)ptr; | 152 | block_group = (struct btrfs_block_group_cache *)(unsigned long)ptr; |
153 | 153 | ||
154 | 154 | ||
155 | if (block_group->key.objectid <= bytenr && bytenr <= | 155 | if (block_group->key.objectid <= bytenr && bytenr <= |
@@ -279,7 +279,7 @@ again: | |||
279 | if (ret) | 279 | if (ret) |
280 | break; | 280 | break; |
281 | 281 | ||
282 | cache = (struct btrfs_block_group_cache *)ptr; | 282 | cache = (struct btrfs_block_group_cache *)(unsigned long)ptr; |
283 | last = cache->key.objectid + cache->key.offset; | 283 | last = cache->key.objectid + cache->key.offset; |
284 | used = btrfs_block_group_used(&cache->item); | 284 | used = btrfs_block_group_used(&cache->item); |
285 | 285 | ||
@@ -537,7 +537,7 @@ int btrfs_write_dirty_block_groups(struct btrfs_trans_handle *trans, | |||
537 | if (ret) | 537 | if (ret) |
538 | break; | 538 | break; |
539 | 539 | ||
540 | cache = (struct btrfs_block_group_cache *)ptr; | 540 | cache = (struct btrfs_block_group_cache *)(unsigned long)ptr; |
541 | err = write_one_cache_group(trans, root, | 541 | err = write_one_cache_group(trans, root, |
542 | path, cache); | 542 | path, cache); |
543 | /* | 543 | /* |
@@ -1541,7 +1541,7 @@ int btrfs_read_block_groups(struct btrfs_root *root) | |||
1541 | found_key.objectid + found_key.offset - 1, | 1541 | found_key.objectid + found_key.offset - 1, |
1542 | bit | EXTENT_LOCKED, GFP_NOFS); | 1542 | bit | EXTENT_LOCKED, GFP_NOFS); |
1543 | set_state_private(block_group_cache, found_key.objectid, | 1543 | set_state_private(block_group_cache, found_key.objectid, |
1544 | (u64)cache); | 1544 | (unsigned long)cache); |
1545 | 1545 | ||
1546 | if (key.objectid >= | 1546 | if (key.objectid >= |
1547 | btrfs_super_total_bytes(&info->super_copy)) | 1547 | btrfs_super_total_bytes(&info->super_copy)) |
diff --git a/fs/btrfs/extent_map.c b/fs/btrfs/extent_map.c index e87e476dca92..89d0ebd0ea83 100644 --- a/fs/btrfs/extent_map.c +++ b/fs/btrfs/extent_map.c | |||
@@ -2654,8 +2654,8 @@ void memcpy_extent_buffer(struct extent_buffer *dst, unsigned long dst_offset, | |||
2654 | 2654 | ||
2655 | cur = min(len, (unsigned long)(PAGE_CACHE_SIZE - | 2655 | cur = min(len, (unsigned long)(PAGE_CACHE_SIZE - |
2656 | src_off_in_page)); | 2656 | src_off_in_page)); |
2657 | cur = min(cur, (unsigned long)(PAGE_CACHE_SIZE - | 2657 | cur = min_t(unsigned long, cur, |
2658 | dst_off_in_page)); | 2658 | (unsigned long)(PAGE_CACHE_SIZE - dst_off_in_page)); |
2659 | 2659 | ||
2660 | copy_pages(extent_buffer_page(dst, dst_i), | 2660 | copy_pages(extent_buffer_page(dst, dst_i), |
2661 | extent_buffer_page(dst, src_i), | 2661 | extent_buffer_page(dst, src_i), |
@@ -2707,7 +2707,7 @@ void memmove_extent_buffer(struct extent_buffer *dst, unsigned long dst_offset, | |||
2707 | if (dst_i == 0) | 2707 | if (dst_i == 0) |
2708 | dst_off_in_page += start_offset; | 2708 | dst_off_in_page += start_offset; |
2709 | 2709 | ||
2710 | cur = min(len, src_off_in_page + 1); | 2710 | cur = min_t(unsigned long, len, src_off_in_page + 1); |
2711 | cur = min(cur, dst_off_in_page + 1); | 2711 | cur = min(cur, dst_off_in_page + 1); |
2712 | move_pages(extent_buffer_page(dst, dst_i), | 2712 | move_pages(extent_buffer_page(dst, dst_i), |
2713 | extent_buffer_page(dst, src_i), | 2713 | extent_buffer_page(dst, src_i), |
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 4aacf99bd97f..96df1b10cb60 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c | |||
@@ -188,7 +188,7 @@ insert: | |||
188 | while (size > 0) { | 188 | while (size > 0) { |
189 | page = pages[i]; | 189 | page = pages[i]; |
190 | kaddr = kmap_atomic(page, KM_USER0); | 190 | kaddr = kmap_atomic(page, KM_USER0); |
191 | cur_size = min(PAGE_CACHE_SIZE - page_offset, size); | 191 | cur_size = min_t(size_t, PAGE_CACHE_SIZE - page_offset, size); |
192 | write_extent_buffer(leaf, kaddr + page_offset, ptr, cur_size); | 192 | write_extent_buffer(leaf, kaddr + page_offset, ptr, cur_size); |
193 | kunmap_atomic(kaddr, KM_USER0); | 193 | kunmap_atomic(kaddr, KM_USER0); |
194 | page_offset = 0; | 194 | page_offset = 0; |
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index ac69f6926afc..0e1ca423e22d 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
@@ -1606,7 +1606,7 @@ again: | |||
1606 | extent_start; | 1606 | extent_start; |
1607 | ptr = btrfs_file_extent_inline_start(item) + extent_offset; | 1607 | ptr = btrfs_file_extent_inline_start(item) + extent_offset; |
1608 | map = kmap(page); | 1608 | map = kmap(page); |
1609 | copy_size = min(PAGE_CACHE_SIZE - page_offset, | 1609 | copy_size = min_t(u64, PAGE_CACHE_SIZE - page_offset, |
1610 | size - extent_offset); | 1610 | size - extent_offset); |
1611 | 1611 | ||
1612 | em->block_start = EXTENT_MAP_INLINE; | 1612 | em->block_start = EXTENT_MAP_INLINE; |