aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/extents.c
diff options
context:
space:
mode:
authorMingming Cao <cmm@us.ibm.com>2006-10-11 04:21:11 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-11 14:14:18 -0400
commit2ae0210760aed9d626eaede5b63db95e198f7c8e (patch)
tree40fd1795f7d2b337407876d515a0147d72cea4f4 /fs/ext4/extents.c
parentbd81d8eec043094d3ff729a8ff6d5b3a06d3c4b1 (diff)
[PATCH] ext4: blk_type from sector_t to unsigned long long
Change ext4 in-kernel block type (ext4_fsblk_t) from sector_t to unsigned long long. Remove ext4 block type string micro E3FSBLK, replaced with "%llu" [akpm@osdl.org: build fix] Signed-off-by: Mingming Cao <cmm@us.ibm.com> Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/ext4/extents.c')
-rw-r--r--fs/ext4/extents.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index e06e937a52b8..f72b7567bfa2 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -281,10 +281,10 @@ static void ext4_ext_show_path(struct inode *inode, struct ext4_ext_path *path)
281 ext_debug("path:"); 281 ext_debug("path:");
282 for (k = 0; k <= l; k++, path++) { 282 for (k = 0; k <= l; k++, path++) {
283 if (path->p_idx) { 283 if (path->p_idx) {
284 ext_debug(" %d->"E3FSBLK, le32_to_cpu(path->p_idx->ei_block), 284 ext_debug(" %d->%llu", le32_to_cpu(path->p_idx->ei_block),
285 idx_pblock(path->p_idx)); 285 idx_pblock(path->p_idx));
286 } else if (path->p_ext) { 286 } else if (path->p_ext) {
287 ext_debug(" %d:%d:"E3FSBLK" ", 287 ext_debug(" %d:%d:%llu ",
288 le32_to_cpu(path->p_ext->ee_block), 288 le32_to_cpu(path->p_ext->ee_block),
289 le16_to_cpu(path->p_ext->ee_len), 289 le16_to_cpu(path->p_ext->ee_len),
290 ext_pblock(path->p_ext)); 290 ext_pblock(path->p_ext));
@@ -308,7 +308,7 @@ static void ext4_ext_show_leaf(struct inode *inode, struct ext4_ext_path *path)
308 ex = EXT_FIRST_EXTENT(eh); 308 ex = EXT_FIRST_EXTENT(eh);
309 309
310 for (i = 0; i < le16_to_cpu(eh->eh_entries); i++, ex++) { 310 for (i = 0; i < le16_to_cpu(eh->eh_entries); i++, ex++) {
311 ext_debug("%d:%d:"E3FSBLK" ", le32_to_cpu(ex->ee_block), 311 ext_debug("%d:%d:%llu ", le32_to_cpu(ex->ee_block),
312 le16_to_cpu(ex->ee_len), ext_pblock(ex)); 312 le16_to_cpu(ex->ee_len), ext_pblock(ex));
313 } 313 }
314 ext_debug("\n"); 314 ext_debug("\n");
@@ -426,7 +426,7 @@ ext4_ext_binsearch(struct inode *inode, struct ext4_ext_path *path, int block)
426 } 426 }
427 427
428 path->p_ext = l - 1; 428 path->p_ext = l - 1;
429 ext_debug(" -> %d:"E3FSBLK":%d ", 429 ext_debug(" -> %d:%llu:%d ",
430 le32_to_cpu(path->p_ext->ee_block), 430 le32_to_cpu(path->p_ext->ee_block),
431 ext_pblock(path->p_ext), 431 ext_pblock(path->p_ext),
432 le16_to_cpu(path->p_ext->ee_len)); 432 le16_to_cpu(path->p_ext->ee_len));
@@ -687,7 +687,7 @@ static int ext4_ext_split(handle_t *handle, struct inode *inode,
687 path[depth].p_ext++; 687 path[depth].p_ext++;
688 while (path[depth].p_ext <= 688 while (path[depth].p_ext <=
689 EXT_MAX_EXTENT(path[depth].p_hdr)) { 689 EXT_MAX_EXTENT(path[depth].p_hdr)) {
690 ext_debug("move %d:"E3FSBLK":%d in new leaf "E3FSBLK"\n", 690 ext_debug("move %d:%llu:%d in new leaf %llu\n",
691 le32_to_cpu(path[depth].p_ext->ee_block), 691 le32_to_cpu(path[depth].p_ext->ee_block),
692 ext_pblock(path[depth].p_ext), 692 ext_pblock(path[depth].p_ext),
693 le16_to_cpu(path[depth].p_ext->ee_len), 693 le16_to_cpu(path[depth].p_ext->ee_len),
@@ -752,7 +752,7 @@ static int ext4_ext_split(handle_t *handle, struct inode *inode,
752 fidx->ei_block = border; 752 fidx->ei_block = border;
753 ext4_idx_store_pblock(fidx, oldblock); 753 ext4_idx_store_pblock(fidx, oldblock);
754 754
755 ext_debug("int.index at %d (block "E3FSBLK"): %lu -> "E3FSBLK"\n", i, 755 ext_debug("int.index at %d (block %llu): %lu -> %llu\n", i,
756 newblock, (unsigned long) le32_to_cpu(border), 756 newblock, (unsigned long) le32_to_cpu(border),
757 oldblock); 757 oldblock);
758 /* copy indexes */ 758 /* copy indexes */
@@ -764,7 +764,7 @@ static int ext4_ext_split(handle_t *handle, struct inode *inode,
764 BUG_ON(EXT_MAX_INDEX(path[i].p_hdr) != 764 BUG_ON(EXT_MAX_INDEX(path[i].p_hdr) !=
765 EXT_LAST_INDEX(path[i].p_hdr)); 765 EXT_LAST_INDEX(path[i].p_hdr));
766 while (path[i].p_idx <= EXT_MAX_INDEX(path[i].p_hdr)) { 766 while (path[i].p_idx <= EXT_MAX_INDEX(path[i].p_hdr)) {
767 ext_debug("%d: move %d:%d in new index "E3FSBLK"\n", i, 767 ext_debug("%d: move %d:%d in new index %llu\n", i,
768 le32_to_cpu(path[i].p_idx->ei_block), 768 le32_to_cpu(path[i].p_idx->ei_block),
769 idx_pblock(path[i].p_idx), 769 idx_pblock(path[i].p_idx),
770 newblock); 770 newblock);
@@ -898,7 +898,7 @@ static int ext4_ext_grow_indepth(handle_t *handle, struct inode *inode,
898 898
899 neh = ext_inode_hdr(inode); 899 neh = ext_inode_hdr(inode);
900 fidx = EXT_FIRST_INDEX(neh); 900 fidx = EXT_FIRST_INDEX(neh);
901 ext_debug("new root: num %d(%d), lblock %d, ptr "E3FSBLK"\n", 901 ext_debug("new root: num %d(%d), lblock %d, ptr %llu\n",
902 le16_to_cpu(neh->eh_entries), le16_to_cpu(neh->eh_max), 902 le16_to_cpu(neh->eh_entries), le16_to_cpu(neh->eh_max),
903 le32_to_cpu(fidx->ei_block), idx_pblock(fidx)); 903 le32_to_cpu(fidx->ei_block), idx_pblock(fidx));
904 904
@@ -1145,7 +1145,7 @@ int ext4_ext_insert_extent(handle_t *handle, struct inode *inode,
1145 1145
1146 /* try to insert block into found extent and return */ 1146 /* try to insert block into found extent and return */
1147 if (ex && ext4_can_extents_be_merged(inode, ex, newext)) { 1147 if (ex && ext4_can_extents_be_merged(inode, ex, newext)) {
1148 ext_debug("append %d block to %d:%d (from "E3FSBLK")\n", 1148 ext_debug("append %d block to %d:%d (from %llu)\n",
1149 le16_to_cpu(newext->ee_len), 1149 le16_to_cpu(newext->ee_len),
1150 le32_to_cpu(ex->ee_block), 1150 le32_to_cpu(ex->ee_block),
1151 le16_to_cpu(ex->ee_len), ext_pblock(ex)); 1151 le16_to_cpu(ex->ee_len), ext_pblock(ex));
@@ -1204,7 +1204,7 @@ has_space:
1204 1204
1205 if (!nearex) { 1205 if (!nearex) {
1206 /* there is no extent in this leaf, create first one */ 1206 /* there is no extent in this leaf, create first one */
1207 ext_debug("first extent in the leaf: %d:"E3FSBLK":%d\n", 1207 ext_debug("first extent in the leaf: %d:%llu:%d\n",
1208 le32_to_cpu(newext->ee_block), 1208 le32_to_cpu(newext->ee_block),
1209 ext_pblock(newext), 1209 ext_pblock(newext),
1210 le16_to_cpu(newext->ee_len)); 1210 le16_to_cpu(newext->ee_len));
@@ -1216,7 +1216,7 @@ has_space:
1216 len = EXT_MAX_EXTENT(eh) - nearex; 1216 len = EXT_MAX_EXTENT(eh) - nearex;
1217 len = (len - 1) * sizeof(struct ext4_extent); 1217 len = (len - 1) * sizeof(struct ext4_extent);
1218 len = len < 0 ? 0 : len; 1218 len = len < 0 ? 0 : len;
1219 ext_debug("insert %d:"E3FSBLK":%d after: nearest 0x%p, " 1219 ext_debug("insert %d:%llu:%d after: nearest 0x%p, "
1220 "move %d from 0x%p to 0x%p\n", 1220 "move %d from 0x%p to 0x%p\n",
1221 le32_to_cpu(newext->ee_block), 1221 le32_to_cpu(newext->ee_block),
1222 ext_pblock(newext), 1222 ext_pblock(newext),
@@ -1229,7 +1229,7 @@ has_space:
1229 BUG_ON(newext->ee_block == nearex->ee_block); 1229 BUG_ON(newext->ee_block == nearex->ee_block);
1230 len = (EXT_MAX_EXTENT(eh) - nearex) * sizeof(struct ext4_extent); 1230 len = (EXT_MAX_EXTENT(eh) - nearex) * sizeof(struct ext4_extent);
1231 len = len < 0 ? 0 : len; 1231 len = len < 0 ? 0 : len;
1232 ext_debug("insert %d:"E3FSBLK":%d before: nearest 0x%p, " 1232 ext_debug("insert %d:%llu:%d before: nearest 0x%p, "
1233 "move %d from 0x%p to 0x%p\n", 1233 "move %d from 0x%p to 0x%p\n",
1234 le32_to_cpu(newext->ee_block), 1234 le32_to_cpu(newext->ee_block),
1235 ext_pblock(newext), 1235 ext_pblock(newext),
@@ -1464,7 +1464,7 @@ ext4_ext_in_cache(struct inode *inode, unsigned long block,
1464 ex->ee_block = cpu_to_le32(cex->ec_block); 1464 ex->ee_block = cpu_to_le32(cex->ec_block);
1465 ext4_ext_store_pblock(ex, cex->ec_start); 1465 ext4_ext_store_pblock(ex, cex->ec_start);
1466 ex->ee_len = cpu_to_le16(cex->ec_len); 1466 ex->ee_len = cpu_to_le16(cex->ec_len);
1467 ext_debug("%lu cached by %lu:%lu:"E3FSBLK"\n", 1467 ext_debug("%lu cached by %lu:%lu:%llu\n",
1468 (unsigned long) block, 1468 (unsigned long) block,
1469 (unsigned long) cex->ec_block, 1469 (unsigned long) cex->ec_block,
1470 (unsigned long) cex->ec_len, 1470 (unsigned long) cex->ec_len,
@@ -1498,7 +1498,7 @@ int ext4_ext_rm_idx(handle_t *handle, struct inode *inode,
1498 path->p_hdr->eh_entries = cpu_to_le16(le16_to_cpu(path->p_hdr->eh_entries)-1); 1498 path->p_hdr->eh_entries = cpu_to_le16(le16_to_cpu(path->p_hdr->eh_entries)-1);
1499 if ((err = ext4_ext_dirty(handle, inode, path))) 1499 if ((err = ext4_ext_dirty(handle, inode, path)))
1500 return err; 1500 return err;
1501 ext_debug("index is empty, remove it, free block "E3FSBLK"\n", leaf); 1501 ext_debug("index is empty, remove it, free block %llu\n", leaf);
1502 bh = sb_find_get_block(inode->i_sb, leaf); 1502 bh = sb_find_get_block(inode->i_sb, leaf);
1503 ext4_forget(handle, 1, inode, bh, leaf); 1503 ext4_forget(handle, 1, inode, bh, leaf);
1504 ext4_free_blocks(handle, inode, leaf, 1); 1504 ext4_free_blocks(handle, inode, leaf, 1);
@@ -1585,7 +1585,7 @@ static int ext4_remove_blocks(handle_t *handle, struct inode *inode,
1585 ext4_fsblk_t start; 1585 ext4_fsblk_t start;
1586 num = le32_to_cpu(ex->ee_block) + le16_to_cpu(ex->ee_len) - from; 1586 num = le32_to_cpu(ex->ee_block) + le16_to_cpu(ex->ee_len) - from;
1587 start = ext_pblock(ex) + le16_to_cpu(ex->ee_len) - num; 1587 start = ext_pblock(ex) + le16_to_cpu(ex->ee_len) - num;
1588 ext_debug("free last %lu blocks starting "E3FSBLK"\n", num, start); 1588 ext_debug("free last %lu blocks starting %llu\n", num, start);
1589 for (i = 0; i < num; i++) { 1589 for (i = 0; i < num; i++) {
1590 bh = sb_find_get_block(inode->i_sb, start + i); 1590 bh = sb_find_get_block(inode->i_sb, start + i);
1591 ext4_forget(handle, 0, inode, bh, start + i); 1591 ext4_forget(handle, 0, inode, bh, start + i);
@@ -1699,7 +1699,7 @@ ext4_ext_rm_leaf(handle_t *handle, struct inode *inode,
1699 if (err) 1699 if (err)
1700 goto out; 1700 goto out;
1701 1701
1702 ext_debug("new extent: %u:%u:"E3FSBLK"\n", block, num, 1702 ext_debug("new extent: %u:%u:%llu\n", block, num,
1703 ext_pblock(ex)); 1703 ext_pblock(ex));
1704 ex--; 1704 ex--;
1705 ex_ee_block = le32_to_cpu(ex->ee_block); 1705 ex_ee_block = le32_to_cpu(ex->ee_block);
@@ -1816,7 +1816,7 @@ int ext4_ext_remove_space(struct inode *inode, unsigned long start)
1816 path[i].p_idx); 1816 path[i].p_idx);
1817 if (ext4_ext_more_to_rm(path + i)) { 1817 if (ext4_ext_more_to_rm(path + i)) {
1818 /* go to the next level */ 1818 /* go to the next level */
1819 ext_debug("move to level %d (block "E3FSBLK")\n", 1819 ext_debug("move to level %d (block %llu)\n",
1820 i + 1, idx_pblock(path[i].p_idx)); 1820 i + 1, idx_pblock(path[i].p_idx));
1821 memset(path + i + 1, 0, sizeof(*path)); 1821 memset(path + i + 1, 0, sizeof(*path));
1822 path[i+1].p_bh = 1822 path[i+1].p_bh =
@@ -1993,7 +1993,7 @@ int ext4_ext_get_blocks(handle_t *handle, struct inode *inode,
1993 newblock = iblock - ee_block + ee_start; 1993 newblock = iblock - ee_block + ee_start;
1994 /* number of remaining blocks in the extent */ 1994 /* number of remaining blocks in the extent */
1995 allocated = ee_len - (iblock - ee_block); 1995 allocated = ee_len - (iblock - ee_block);
1996 ext_debug("%d fit into %lu:%d -> "E3FSBLK"\n", (int) iblock, 1996 ext_debug("%d fit into %lu:%d -> %llu\n", (int) iblock,
1997 ee_block, ee_len, newblock); 1997 ee_block, ee_len, newblock);
1998 ext4_ext_put_in_cache(inode, ee_block, ee_len, 1998 ext4_ext_put_in_cache(inode, ee_block, ee_len,
1999 ee_start, EXT4_EXT_CACHE_EXTENT); 1999 ee_start, EXT4_EXT_CACHE_EXTENT);
@@ -2024,7 +2024,7 @@ int ext4_ext_get_blocks(handle_t *handle, struct inode *inode,
2024 newblock = ext4_new_blocks(handle, inode, goal, &allocated, &err); 2024 newblock = ext4_new_blocks(handle, inode, goal, &allocated, &err);
2025 if (!newblock) 2025 if (!newblock)
2026 goto out2; 2026 goto out2;
2027 ext_debug("allocate new block: goal "E3FSBLK", found "E3FSBLK"/%lu\n", 2027 ext_debug("allocate new block: goal %llu, found %llu/%lu\n",
2028 goal, newblock, allocated); 2028 goal, newblock, allocated);
2029 2029
2030 /* try to insert new extent into found leaf and return */ 2030 /* try to insert new extent into found leaf and return */