Commit 2ae02107 authored by Mingming Cao's avatar Mingming Cao Committed by Linus Torvalds

[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: default avatarMingming Cao <cmm@us.ibm.com>
Signed-off-by: default avatarDave Kleikamp <shaggy@austin.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent bd81d8ee
...@@ -103,7 +103,7 @@ read_block_bitmap(struct super_block *sb, unsigned int block_group) ...@@ -103,7 +103,7 @@ read_block_bitmap(struct super_block *sb, unsigned int block_group)
if (!bh) if (!bh)
ext4_error (sb, "read_block_bitmap", ext4_error (sb, "read_block_bitmap",
"Cannot read block bitmap - " "Cannot read block bitmap - "
"block_group = %d, block_bitmap = "E3FSBLK, "block_group = %d, block_bitmap = %llu",
block_group, block_group,
ext4_block_bitmap(desc)); ext4_block_bitmap(desc));
error_out: error_out:
...@@ -148,7 +148,7 @@ static void __rsv_window_dump(struct rb_root *root, int verbose, ...@@ -148,7 +148,7 @@ static void __rsv_window_dump(struct rb_root *root, int verbose,
rsv = list_entry(n, struct ext4_reserve_window_node, rsv_node); rsv = list_entry(n, struct ext4_reserve_window_node, rsv_node);
if (verbose) if (verbose)
printk("reservation window 0x%p " printk("reservation window 0x%p "
"start: "E3FSBLK", end: "E3FSBLK"\n", "start: %llu, end: %llu\n",
rsv, rsv->rsv_start, rsv->rsv_end); rsv, rsv->rsv_start, rsv->rsv_end);
if (rsv->rsv_start && rsv->rsv_start >= rsv->rsv_end) { if (rsv->rsv_start && rsv->rsv_start >= rsv->rsv_end) {
printk("Bad reservation %p (start >= end)\n", printk("Bad reservation %p (start >= end)\n",
...@@ -436,7 +436,7 @@ void ext4_free_blocks_sb(handle_t *handle, struct super_block *sb, ...@@ -436,7 +436,7 @@ void ext4_free_blocks_sb(handle_t *handle, struct super_block *sb,
block + count > ext4_blocks_count(es)) { block + count > ext4_blocks_count(es)) {
ext4_error (sb, "ext4_free_blocks", ext4_error (sb, "ext4_free_blocks",
"Freeing blocks not in datazone - " "Freeing blocks not in datazone - "
"block = "E3FSBLK", count = %lu", block, count); "block = %llu, count = %lu", block, count);
goto error_return; goto error_return;
} }
...@@ -468,7 +468,7 @@ void ext4_free_blocks_sb(handle_t *handle, struct super_block *sb, ...@@ -468,7 +468,7 @@ void ext4_free_blocks_sb(handle_t *handle, struct super_block *sb,
sbi->s_itb_per_group)) sbi->s_itb_per_group))
ext4_error (sb, "ext4_free_blocks", ext4_error (sb, "ext4_free_blocks",
"Freeing blocks in system zones - " "Freeing blocks in system zones - "
"Block = "E3FSBLK", count = %lu", "Block = %llu, count = %lu",
block, count); block, count);
/* /*
...@@ -552,7 +552,7 @@ void ext4_free_blocks_sb(handle_t *handle, struct super_block *sb, ...@@ -552,7 +552,7 @@ void ext4_free_blocks_sb(handle_t *handle, struct super_block *sb,
bit + i, bitmap_bh->b_data)) { bit + i, bitmap_bh->b_data)) {
jbd_unlock_bh_state(bitmap_bh); jbd_unlock_bh_state(bitmap_bh);
ext4_error(sb, __FUNCTION__, ext4_error(sb, __FUNCTION__,
"bit already cleared for block "E3FSBLK, "bit already cleared for block %llu",
(ext4_fsblk_t)(block + i)); (ext4_fsblk_t)(block + i));
jbd_lock_bh_state(bitmap_bh); jbd_lock_bh_state(bitmap_bh);
BUFFER_TRACE(bitmap_bh, "bit already cleared"); BUFFER_TRACE(bitmap_bh, "bit already cleared");
...@@ -1569,7 +1569,7 @@ ext4_fsblk_t ext4_new_blocks(handle_t *handle, struct inode *inode, ...@@ -1569,7 +1569,7 @@ ext4_fsblk_t ext4_new_blocks(handle_t *handle, struct inode *inode,
EXT4_SB(sb)->s_itb_per_group)) EXT4_SB(sb)->s_itb_per_group))
ext4_error(sb, "ext4_new_block", ext4_error(sb, "ext4_new_block",
"Allocating block in system zone - " "Allocating block in system zone - "
"blocks from "E3FSBLK", length %lu", "blocks from %llu, length %lu",
ret_block, num); ret_block, num);
performed_allocation = 1; performed_allocation = 1;
...@@ -1606,7 +1606,7 @@ ext4_fsblk_t ext4_new_blocks(handle_t *handle, struct inode *inode, ...@@ -1606,7 +1606,7 @@ ext4_fsblk_t ext4_new_blocks(handle_t *handle, struct inode *inode,
if (ret_block + num - 1 >= ext4_blocks_count(es)) { if (ret_block + num - 1 >= ext4_blocks_count(es)) {
ext4_error(sb, "ext4_new_block", ext4_error(sb, "ext4_new_block",
"block("E3FSBLK") >= blocks count("E3FSBLK") - " "block(%llu) >= blocks count(%llu) - "
"block_group = %lu, es == %p ", ret_block, "block_group = %lu, es == %p ", ret_block,
ext4_blocks_count(es), group_no, es); ext4_blocks_count(es), group_no, es);
goto out; goto out;
...@@ -1705,8 +1705,8 @@ ext4_fsblk_t ext4_count_free_blocks(struct super_block *sb) ...@@ -1705,8 +1705,8 @@ ext4_fsblk_t ext4_count_free_blocks(struct super_block *sb)
bitmap_count += x; bitmap_count += x;
} }
brelse(bitmap_bh); brelse(bitmap_bh);
printk("ext4_count_free_blocks: stored = "E3FSBLK printk("ext4_count_free_blocks: stored = %llu"
", computed = "E3FSBLK", "E3FSBLK"\n", ", computed = %llu, %llu\n",
EXT4_FREE_BLOCKS_COUNT(es), EXT4_FREE_BLOCKS_COUNT(es),
desc_count, bitmap_count); desc_count, bitmap_count);
return bitmap_count; return bitmap_count;
......
...@@ -281,10 +281,10 @@ static void ext4_ext_show_path(struct inode *inode, struct ext4_ext_path *path) ...@@ -281,10 +281,10 @@ static void ext4_ext_show_path(struct inode *inode, struct ext4_ext_path *path)
ext_debug("path:"); ext_debug("path:");
for (k = 0; k <= l; k++, path++) { for (k = 0; k <= l; k++, path++) {
if (path->p_idx) { if (path->p_idx) {
ext_debug(" %d->"E3FSBLK, le32_to_cpu(path->p_idx->ei_block), ext_debug(" %d->%llu", le32_to_cpu(path->p_idx->ei_block),
idx_pblock(path->p_idx)); idx_pblock(path->p_idx));
} else if (path->p_ext) { } else if (path->p_ext) {
ext_debug(" %d:%d:"E3FSBLK" ", ext_debug(" %d:%d:%llu ",
le32_to_cpu(path->p_ext->ee_block), le32_to_cpu(path->p_ext->ee_block),
le16_to_cpu(path->p_ext->ee_len), le16_to_cpu(path->p_ext->ee_len),
ext_pblock(path->p_ext)); ext_pblock(path->p_ext));
...@@ -308,7 +308,7 @@ static void ext4_ext_show_leaf(struct inode *inode, struct ext4_ext_path *path) ...@@ -308,7 +308,7 @@ static void ext4_ext_show_leaf(struct inode *inode, struct ext4_ext_path *path)
ex = EXT_FIRST_EXTENT(eh); ex = EXT_FIRST_EXTENT(eh);
for (i = 0; i < le16_to_cpu(eh->eh_entries); i++, ex++) { for (i = 0; i < le16_to_cpu(eh->eh_entries); i++, ex++) {
ext_debug("%d:%d:"E3FSBLK" ", le32_to_cpu(ex->ee_block), ext_debug("%d:%d:%llu ", le32_to_cpu(ex->ee_block),
le16_to_cpu(ex->ee_len), ext_pblock(ex)); le16_to_cpu(ex->ee_len), ext_pblock(ex));
} }
ext_debug("\n"); ext_debug("\n");
...@@ -426,7 +426,7 @@ ext4_ext_binsearch(struct inode *inode, struct ext4_ext_path *path, int block) ...@@ -426,7 +426,7 @@ ext4_ext_binsearch(struct inode *inode, struct ext4_ext_path *path, int block)
} }
path->p_ext = l - 1; path->p_ext = l - 1;
ext_debug(" -> %d:"E3FSBLK":%d ", ext_debug(" -> %d:%llu:%d ",
le32_to_cpu(path->p_ext->ee_block), le32_to_cpu(path->p_ext->ee_block),
ext_pblock(path->p_ext), ext_pblock(path->p_ext),
le16_to_cpu(path->p_ext->ee_len)); le16_to_cpu(path->p_ext->ee_len));
...@@ -687,7 +687,7 @@ static int ext4_ext_split(handle_t *handle, struct inode *inode, ...@@ -687,7 +687,7 @@ static int ext4_ext_split(handle_t *handle, struct inode *inode,
path[depth].p_ext++; path[depth].p_ext++;
while (path[depth].p_ext <= while (path[depth].p_ext <=
EXT_MAX_EXTENT(path[depth].p_hdr)) { EXT_MAX_EXTENT(path[depth].p_hdr)) {
ext_debug("move %d:"E3FSBLK":%d in new leaf "E3FSBLK"\n", ext_debug("move %d:%llu:%d in new leaf %llu\n",
le32_to_cpu(path[depth].p_ext->ee_block), le32_to_cpu(path[depth].p_ext->ee_block),
ext_pblock(path[depth].p_ext), ext_pblock(path[depth].p_ext),
le16_to_cpu(path[depth].p_ext->ee_len), 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,7 +752,7 @@ static int ext4_ext_split(handle_t *handle, struct inode *inode,
fidx->ei_block = border; fidx->ei_block = border;
ext4_idx_store_pblock(fidx, oldblock); ext4_idx_store_pblock(fidx, oldblock);
ext_debug("int.index at %d (block "E3FSBLK"): %lu -> "E3FSBLK"\n", i, ext_debug("int.index at %d (block %llu): %lu -> %llu\n", i,
newblock, (unsigned long) le32_to_cpu(border), newblock, (unsigned long) le32_to_cpu(border),
oldblock); oldblock);
/* copy indexes */ /* copy indexes */
...@@ -764,7 +764,7 @@ static int ext4_ext_split(handle_t *handle, struct inode *inode, ...@@ -764,7 +764,7 @@ static int ext4_ext_split(handle_t *handle, struct inode *inode,
BUG_ON(EXT_MAX_INDEX(path[i].p_hdr) != BUG_ON(EXT_MAX_INDEX(path[i].p_hdr) !=
EXT_LAST_INDEX(path[i].p_hdr)); EXT_LAST_INDEX(path[i].p_hdr));
while (path[i].p_idx <= EXT_MAX_INDEX(path[i].p_hdr)) { while (path[i].p_idx <= EXT_MAX_INDEX(path[i].p_hdr)) {
ext_debug("%d: move %d:%d in new index "E3FSBLK"\n", i, ext_debug("%d: move %d:%d in new index %llu\n", i,
le32_to_cpu(path[i].p_idx->ei_block), le32_to_cpu(path[i].p_idx->ei_block),
idx_pblock(path[i].p_idx), idx_pblock(path[i].p_idx),
newblock); newblock);
...@@ -898,7 +898,7 @@ static int ext4_ext_grow_indepth(handle_t *handle, struct inode *inode, ...@@ -898,7 +898,7 @@ static int ext4_ext_grow_indepth(handle_t *handle, struct inode *inode,
neh = ext_inode_hdr(inode); neh = ext_inode_hdr(inode);
fidx = EXT_FIRST_INDEX(neh); fidx = EXT_FIRST_INDEX(neh);
ext_debug("new root: num %d(%d), lblock %d, ptr "E3FSBLK"\n", ext_debug("new root: num %d(%d), lblock %d, ptr %llu\n",
le16_to_cpu(neh->eh_entries), le16_to_cpu(neh->eh_max), le16_to_cpu(neh->eh_entries), le16_to_cpu(neh->eh_max),
le32_to_cpu(fidx->ei_block), idx_pblock(fidx)); le32_to_cpu(fidx->ei_block), idx_pblock(fidx));
...@@ -1145,7 +1145,7 @@ int ext4_ext_insert_extent(handle_t *handle, struct inode *inode, ...@@ -1145,7 +1145,7 @@ int ext4_ext_insert_extent(handle_t *handle, struct inode *inode,
/* try to insert block into found extent and return */ /* try to insert block into found extent and return */
if (ex && ext4_can_extents_be_merged(inode, ex, newext)) { if (ex && ext4_can_extents_be_merged(inode, ex, newext)) {
ext_debug("append %d block to %d:%d (from "E3FSBLK")\n", ext_debug("append %d block to %d:%d (from %llu)\n",
le16_to_cpu(newext->ee_len), le16_to_cpu(newext->ee_len),
le32_to_cpu(ex->ee_block), le32_to_cpu(ex->ee_block),
le16_to_cpu(ex->ee_len), ext_pblock(ex)); le16_to_cpu(ex->ee_len), ext_pblock(ex));
...@@ -1204,7 +1204,7 @@ int ext4_ext_insert_extent(handle_t *handle, struct inode *inode, ...@@ -1204,7 +1204,7 @@ int ext4_ext_insert_extent(handle_t *handle, struct inode *inode,
if (!nearex) { if (!nearex) {
/* there is no extent in this leaf, create first one */ /* there is no extent in this leaf, create first one */
ext_debug("first extent in the leaf: %d:"E3FSBLK":%d\n", ext_debug("first extent in the leaf: %d:%llu:%d\n",
le32_to_cpu(newext->ee_block), le32_to_cpu(newext->ee_block),
ext_pblock(newext), ext_pblock(newext),
le16_to_cpu(newext->ee_len)); le16_to_cpu(newext->ee_len));
...@@ -1216,7 +1216,7 @@ int ext4_ext_insert_extent(handle_t *handle, struct inode *inode, ...@@ -1216,7 +1216,7 @@ int ext4_ext_insert_extent(handle_t *handle, struct inode *inode,
len = EXT_MAX_EXTENT(eh) - nearex; len = EXT_MAX_EXTENT(eh) - nearex;
len = (len - 1) * sizeof(struct ext4_extent); len = (len - 1) * sizeof(struct ext4_extent);
len = len < 0 ? 0 : len; len = len < 0 ? 0 : len;
ext_debug("insert %d:"E3FSBLK":%d after: nearest 0x%p, " ext_debug("insert %d:%llu:%d after: nearest 0x%p, "
"move %d from 0x%p to 0x%p\n", "move %d from 0x%p to 0x%p\n",
le32_to_cpu(newext->ee_block), le32_to_cpu(newext->ee_block),
ext_pblock(newext), ext_pblock(newext),
...@@ -1229,7 +1229,7 @@ int ext4_ext_insert_extent(handle_t *handle, struct inode *inode, ...@@ -1229,7 +1229,7 @@ int ext4_ext_insert_extent(handle_t *handle, struct inode *inode,
BUG_ON(newext->ee_block == nearex->ee_block); BUG_ON(newext->ee_block == nearex->ee_block);
len = (EXT_MAX_EXTENT(eh) - nearex) * sizeof(struct ext4_extent); len = (EXT_MAX_EXTENT(eh) - nearex) * sizeof(struct ext4_extent);
len = len < 0 ? 0 : len; len = len < 0 ? 0 : len;
ext_debug("insert %d:"E3FSBLK":%d before: nearest 0x%p, " ext_debug("insert %d:%llu:%d before: nearest 0x%p, "
"move %d from 0x%p to 0x%p\n", "move %d from 0x%p to 0x%p\n",
le32_to_cpu(newext->ee_block), le32_to_cpu(newext->ee_block),
ext_pblock(newext), ext_pblock(newext),
...@@ -1464,7 +1464,7 @@ ext4_ext_in_cache(struct inode *inode, unsigned long block, ...@@ -1464,7 +1464,7 @@ ext4_ext_in_cache(struct inode *inode, unsigned long block,
ex->ee_block = cpu_to_le32(cex->ec_block); ex->ee_block = cpu_to_le32(cex->ec_block);
ext4_ext_store_pblock(ex, cex->ec_start); ext4_ext_store_pblock(ex, cex->ec_start);
ex->ee_len = cpu_to_le16(cex->ec_len); ex->ee_len = cpu_to_le16(cex->ec_len);
ext_debug("%lu cached by %lu:%lu:"E3FSBLK"\n", ext_debug("%lu cached by %lu:%lu:%llu\n",
(unsigned long) block, (unsigned long) block,
(unsigned long) cex->ec_block, (unsigned long) cex->ec_block,
(unsigned long) cex->ec_len, (unsigned long) cex->ec_len,
...@@ -1498,7 +1498,7 @@ int ext4_ext_rm_idx(handle_t *handle, struct inode *inode, ...@@ -1498,7 +1498,7 @@ int ext4_ext_rm_idx(handle_t *handle, struct inode *inode,
path->p_hdr->eh_entries = cpu_to_le16(le16_to_cpu(path->p_hdr->eh_entries)-1); path->p_hdr->eh_entries = cpu_to_le16(le16_to_cpu(path->p_hdr->eh_entries)-1);
if ((err = ext4_ext_dirty(handle, inode, path))) if ((err = ext4_ext_dirty(handle, inode, path)))
return err; return err;
ext_debug("index is empty, remove it, free block "E3FSBLK"\n", leaf); ext_debug("index is empty, remove it, free block %llu\n", leaf);
bh = sb_find_get_block(inode->i_sb, leaf); bh = sb_find_get_block(inode->i_sb, leaf);
ext4_forget(handle, 1, inode, bh, leaf); ext4_forget(handle, 1, inode, bh, leaf);
ext4_free_blocks(handle, inode, leaf, 1); ext4_free_blocks(handle, inode, leaf, 1);
...@@ -1585,7 +1585,7 @@ static int ext4_remove_blocks(handle_t *handle, struct inode *inode, ...@@ -1585,7 +1585,7 @@ static int ext4_remove_blocks(handle_t *handle, struct inode *inode,
ext4_fsblk_t start; ext4_fsblk_t start;
num = le32_to_cpu(ex->ee_block) + le16_to_cpu(ex->ee_len) - from; num = le32_to_cpu(ex->ee_block) + le16_to_cpu(ex->ee_len) - from;
start = ext_pblock(ex) + le16_to_cpu(ex->ee_len) - num; start = ext_pblock(ex) + le16_to_cpu(ex->ee_len) - num;
ext_debug("free last %lu blocks starting "E3FSBLK"\n", num, start); ext_debug("free last %lu blocks starting %llu\n", num, start);
for (i = 0; i < num; i++) { for (i = 0; i < num; i++) {
bh = sb_find_get_block(inode->i_sb, start + i); bh = sb_find_get_block(inode->i_sb, start + i);
ext4_forget(handle, 0, inode, bh, start + i); ext4_forget(handle, 0, inode, bh, start + i);
...@@ -1699,7 +1699,7 @@ ext4_ext_rm_leaf(handle_t *handle, struct inode *inode, ...@@ -1699,7 +1699,7 @@ ext4_ext_rm_leaf(handle_t *handle, struct inode *inode,
if (err) if (err)
goto out; goto out;
ext_debug("new extent: %u:%u:"E3FSBLK"\n", block, num, ext_debug("new extent: %u:%u:%llu\n", block, num,
ext_pblock(ex)); ext_pblock(ex));
ex--; ex--;
ex_ee_block = le32_to_cpu(ex->ee_block); 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,7 +1816,7 @@ int ext4_ext_remove_space(struct inode *inode, unsigned long start)
path[i].p_idx); path[i].p_idx);
if (ext4_ext_more_to_rm(path + i)) { if (ext4_ext_more_to_rm(path + i)) {
/* go to the next level */ /* go to the next level */
ext_debug("move to level %d (block "E3FSBLK")\n", ext_debug("move to level %d (block %llu)\n",
i + 1, idx_pblock(path[i].p_idx)); i + 1, idx_pblock(path[i].p_idx));
memset(path + i + 1, 0, sizeof(*path)); memset(path + i + 1, 0, sizeof(*path));
path[i+1].p_bh = path[i+1].p_bh =
...@@ -1993,7 +1993,7 @@ int ext4_ext_get_blocks(handle_t *handle, struct inode *inode, ...@@ -1993,7 +1993,7 @@ int ext4_ext_get_blocks(handle_t *handle, struct inode *inode,
newblock = iblock - ee_block + ee_start; newblock = iblock - ee_block + ee_start;
/* number of remaining blocks in the extent */ /* number of remaining blocks in the extent */
allocated = ee_len - (iblock - ee_block); allocated = ee_len - (iblock - ee_block);
ext_debug("%d fit into %lu:%d -> "E3FSBLK"\n", (int) iblock, ext_debug("%d fit into %lu:%d -> %llu\n", (int) iblock,
ee_block, ee_len, newblock); ee_block, ee_len, newblock);
ext4_ext_put_in_cache(inode, ee_block, ee_len, ext4_ext_put_in_cache(inode, ee_block, ee_len,
ee_start, EXT4_EXT_CACHE_EXTENT); ee_start, EXT4_EXT_CACHE_EXTENT);
...@@ -2024,7 +2024,7 @@ int ext4_ext_get_blocks(handle_t *handle, struct inode *inode, ...@@ -2024,7 +2024,7 @@ int ext4_ext_get_blocks(handle_t *handle, struct inode *inode,
newblock = ext4_new_blocks(handle, inode, goal, &allocated, &err); newblock = ext4_new_blocks(handle, inode, goal, &allocated, &err);
if (!newblock) if (!newblock)
goto out2; goto out2;
ext_debug("allocate new block: goal "E3FSBLK", found "E3FSBLK"/%lu\n", ext_debug("allocate new block: goal %llu, found %llu/%lu\n",
goal, newblock, allocated); goal, newblock, allocated);
/* try to insert new extent into found leaf and return */ /* try to insert new extent into found leaf and return */
......
...@@ -2115,7 +2115,7 @@ static void ext4_free_branches(handle_t *handle, struct inode *inode, ...@@ -2115,7 +2115,7 @@ static void ext4_free_branches(handle_t *handle, struct inode *inode,
*/ */
if (!bh) { if (!bh) {
ext4_error(inode->i_sb, "ext4_free_branches", ext4_error(inode->i_sb, "ext4_free_branches",
"Read failure, inode=%lu, block="E3FSBLK, "Read failure, inode=%lu, block=%llu",
inode->i_ino, nr); inode->i_ino, nr);
continue; continue;
} }
...@@ -2466,7 +2466,7 @@ static int __ext4_get_inode_loc(struct inode *inode, ...@@ -2466,7 +2466,7 @@ static int __ext4_get_inode_loc(struct inode *inode,
if (!bh) { if (!bh) {
ext4_error (inode->i_sb, "ext4_get_inode_loc", ext4_error (inode->i_sb, "ext4_get_inode_loc",
"unable to read inode block - " "unable to read inode block - "
"inode=%lu, block="E3FSBLK, "inode=%lu, block=%llu",
inode->i_ino, block); inode->i_ino, block);
return -EIO; return -EIO;
} }
...@@ -2548,7 +2548,7 @@ static int __ext4_get_inode_loc(struct inode *inode, ...@@ -2548,7 +2548,7 @@ static int __ext4_get_inode_loc(struct inode *inode,
if (!buffer_uptodate(bh)) { if (!buffer_uptodate(bh)) {
ext4_error(inode->i_sb, "ext4_get_inode_loc", ext4_error(inode->i_sb, "ext4_get_inode_loc",
"unable to read inode block - " "unable to read inode block - "
"inode=%lu, block="E3FSBLK, "inode=%lu, block=%llu",
inode->i_ino, block); inode->i_ino, block);
brelse(bh); brelse(bh);
return -EIO; return -EIO;
......
...@@ -64,7 +64,7 @@ static int verify_group_input(struct super_block *sb, ...@@ -64,7 +64,7 @@ static int verify_group_input(struct super_block *sb,
input->blocks_count); input->blocks_count);
else if (!(bh = sb_bread(sb, end - 1))) else if (!(bh = sb_bread(sb, end - 1)))
ext4_warning(sb, __FUNCTION__, ext4_warning(sb, __FUNCTION__,
"Cannot read last block ("E3FSBLK")", "Cannot read last block (%llu)",
end - 1); end - 1);
else if (outside(input->block_bitmap, start, end)) else if (outside(input->block_bitmap, start, end))
ext4_warning(sb, __FUNCTION__, ext4_warning(sb, __FUNCTION__,
...@@ -94,18 +94,18 @@ static int verify_group_input(struct super_block *sb, ...@@ -94,18 +94,18 @@ static int verify_group_input(struct super_block *sb,
else if (inside(input->block_bitmap, start, metaend)) else if (inside(input->block_bitmap, start, metaend))
ext4_warning(sb, __FUNCTION__, ext4_warning(sb, __FUNCTION__,
"Block bitmap (%llu) in GDT table" "Block bitmap (%llu) in GDT table"
" ("E3FSBLK"-"E3FSBLK")", " (%llu-%llu)",
input->block_bitmap, start, metaend - 1); input->block_bitmap, start, metaend - 1);
else if (inside(input->inode_bitmap, start, metaend)) else if (inside(input->inode_bitmap, start, metaend))
ext4_warning(sb, __FUNCTION__, ext4_warning(sb, __FUNCTION__,
"Inode bitmap (%llu) in GDT table" "Inode bitmap (%llu) in GDT table"
" ("E3FSBLK"-"E3FSBLK")", " (%llu-%llu)",
input->inode_bitmap, start, metaend - 1); input->inode_bitmap, start, metaend - 1);
else if (inside(input->inode_table, start, metaend) || else if (inside(input->inode_table, start, metaend) ||
inside(itend - 1, start, metaend)) inside(itend - 1, start, metaend))
ext4_warning(sb, __FUNCTION__, ext4_warning(sb, __FUNCTION__,
"Inode table ("E3FSBLK"-"E3FSBLK") overlaps" "Inode table (%llu-%llu) overlaps"
"GDT table ("E3FSBLK"-"E3FSBLK")", "GDT table (%llu-%llu)",
input->inode_table, itend - 1, start, metaend - 1); input->inode_table, itend - 1, start, metaend - 1);
else else
err = 0; err = 0;
...@@ -344,8 +344,8 @@ static int verify_reserved_gdb(struct super_block *sb, ...@@ -344,8 +344,8 @@ static int verify_reserved_gdb(struct super_block *sb,
if (le32_to_cpu(*p++) != if (le32_to_cpu(*p++) !=
grp * EXT4_BLOCKS_PER_GROUP(sb) + blk){ grp * EXT4_BLOCKS_PER_GROUP(sb) + blk){
ext4_warning(sb, __FUNCTION__, ext4_warning(sb, __FUNCTION__,
"reserved GDT "E3FSBLK "reserved GDT %llu"
" missing grp %d ("E3FSBLK")", " missing grp %d (%llu)",
blk, grp, blk, grp,
grp * grp *
(ext4_fsblk_t)EXT4_BLOCKS_PER_GROUP(sb) + (ext4_fsblk_t)EXT4_BLOCKS_PER_GROUP(sb) +
...@@ -424,7 +424,7 @@ static int add_new_gdb(handle_t *handle, struct inode *inode, ...@@ -424,7 +424,7 @@ static int add_new_gdb(handle_t *handle, struct inode *inode,
data = (__le32 *)dind->b_data; data = (__le32 *)dind->b_data;
if (le32_to_cpu(data[gdb_num % EXT4_ADDR_PER_BLOCK(sb)]) != gdblock) { if (le32_to_cpu(data[gdb_num % EXT4_ADDR_PER_BLOCK(sb)]) != gdblock) {
ext4_warning(sb, __FUNCTION__, ext4_warning(sb, __FUNCTION__,
"new group %u GDT block "E3FSBLK" not reserved", "new group %u GDT block %llu not reserved",
input->group, gdblock); input->group, gdblock);
err = -EINVAL; err = -EINVAL;
goto exit_dind; goto exit_dind;
...@@ -547,7 +547,7 @@ static int reserve_backup_gdb(handle_t *handle, struct inode *inode, ...@@ -547,7 +547,7 @@ static int reserve_backup_gdb(handle_t *handle, struct inode *inode,
for (res = 0; res < reserved_gdb; res++, blk++) { for (res = 0; res < reserved_gdb; res++, blk++) {
if (le32_to_cpu(*data) != blk) { if (le32_to_cpu(*data) != blk) {
ext4_warning(sb, __FUNCTION__, ext4_warning(sb, __FUNCTION__,
"reserved block "E3FSBLK "reserved block %llu"
" not at offset %ld", " not at offset %ld",
blk, blk,
(long)(data - (__le32 *)dind->b_data)); (long)(data - (__le32 *)dind->b_data));
...@@ -941,7 +941,7 @@ int ext4_group_extend(struct super_block *sb, struct ext4_super_block *es, ...@@ -941,7 +941,7 @@ int ext4_group_extend(struct super_block *sb, struct ext4_super_block *es,
o_groups_count = EXT4_SB(sb)->s_groups_count; o_groups_count = EXT4_SB(sb)->s_groups_count;
if (test_opt(sb, DEBUG)) if (test_opt(sb, DEBUG))
printk(KERN_DEBUG "EXT4-fs: extending last group from "E3FSBLK" uto "E3FSBLK" blocks\n", printk(KERN_DEBUG "EXT4-fs: extending last group from %llu uto %llu blocks\n",
o_blocks_count, n_blocks_count); o_blocks_count, n_blocks_count);
if (n_blocks_count == 0 || n_blocks_count == o_blocks_count) if (n_blocks_count == 0 || n_blocks_count == o_blocks_count)
...@@ -949,7 +949,7 @@ int ext4_group_extend(struct super_block *sb, struct ext4_super_block *es, ...@@ -949,7 +949,7 @@ int ext4_group_extend(struct super_block *sb, struct ext4_super_block *es,
if (n_blocks_count > (sector_t)(~0ULL) >> (sb->s_blocksize_bits - 9)) { if (n_blocks_count > (sector_t)(~0ULL) >> (sb->s_blocksize_bits - 9)) {
printk(KERN_ERR "EXT4-fs: filesystem on %s:" printk(KERN_ERR "EXT4-fs: filesystem on %s:"
" too large to resize to "E3FSBLK" blocks safely\n", " too large to resize to %llu blocks safely\n",
sb->s_id, n_blocks_count); sb->s_id, n_blocks_count);
if (sizeof(sector_t) < 8) if (sizeof(sector_t) < 8)
ext4_warning(sb, __FUNCTION__, ext4_warning(sb, __FUNCTION__,
...@@ -984,7 +984,7 @@ int ext4_group_extend(struct super_block *sb, struct ext4_super_block *es, ...@@ -984,7 +984,7 @@ int ext4_group_extend(struct super_block *sb, struct ext4_super_block *es,
if (o_blocks_count + add < n_blocks_count) if (o_blocks_count + add < n_blocks_count)
ext4_warning(sb, __FUNCTION__, ext4_warning(sb, __FUNCTION__,
"will only finish group ("E3FSBLK "will only finish group (%llu"
" blocks, %u new)", " blocks, %u new)",
o_blocks_count + add, add); o_blocks_count + add, add);
...@@ -1028,10 +1028,10 @@ int ext4_group_extend(struct super_block *sb, struct ext4_super_block *es, ...@@ -1028,10 +1028,10 @@ int ext4_group_extend(struct super_block *sb, struct ext4_super_block *es,
ext4_journal_dirty_metadata(handle, EXT4_SB(sb)->s_sbh); ext4_journal_dirty_metadata(handle, EXT4_SB(sb)->s_sbh);
sb->s_dirt = 1; sb->s_dirt = 1;
unlock_super(sb); unlock_super(sb);
ext4_debug("freeing blocks %lu through "E3FSBLK"\n", o_blocks_count, ext4_debug("freeing blocks %lu through %llu\n", o_blocks_count,
o_blocks_count + add); o_blocks_count + add);
ext4_free_blocks_sb(handle, sb, o_blocks_count, add, &freed_blocks); ext4_free_blocks_sb(handle, sb, o_blocks_count, add, &freed_blocks);
ext4_debug("freed blocks "E3FSBLK" through "E3FSBLK"\n", o_blocks_count, ext4_debug("freed blocks %llu through %llu\n", o_blocks_count,
o_blocks_count + add); o_blocks_count + add);
if ((err = ext4_journal_stop(handle))) if ((err = ext4_journal_stop(handle)))
goto exit_put; goto exit_put;
......
...@@ -1244,7 +1244,7 @@ static int ext4_check_descriptors (struct super_block * sb) ...@@ -1244,7 +1244,7 @@ static int ext4_check_descriptors (struct super_block * sb)
{ {
ext4_error (sb, "ext4_check_descriptors", ext4_error (sb, "ext4_check_descriptors",
"Block bitmap for group %d" "Block bitmap for group %d"
" not in group (block "E3FSBLK")!", " not in group (block %llu)!",
i, block_bitmap); i, block_bitmap);
return 0; return 0;
} }
...@@ -1253,7 +1253,7 @@ static int ext4_check_descriptors (struct super_block * sb) ...@@ -1253,7 +1253,7 @@ static int ext4_check_descriptors (struct super_block * sb)
{ {
ext4_error (sb, "ext4_check_descriptors", ext4_error (sb, "ext4_check_descriptors",
"Inode bitmap for group %d" "Inode bitmap for group %d"
" not in group (block "E3FSBLK")!", " not in group (block %llu)!",
i, inode_bitmap); i, inode_bitmap);
return 0; return 0;
} }
...@@ -1263,7 +1263,7 @@ static int ext4_check_descriptors (struct super_block * sb) ...@@ -1263,7 +1263,7 @@ static int ext4_check_descriptors (struct super_block * sb)
{ {
ext4_error (sb, "ext4_check_descriptors", ext4_error (sb, "ext4_check_descriptors",
"Inode table for group %d" "Inode table for group %d"
" not in group (block "E3FSBLK")!", " not in group (block %llu)!",
i, inode_table); i, inode_table);
return 0; return 0;
} }
......
...@@ -233,7 +233,7 @@ ext4_xattr_block_get(struct inode *inode, int name_index, const char *name, ...@@ -233,7 +233,7 @@ ext4_xattr_block_get(struct inode *inode, int name_index, const char *name,
atomic_read(&(bh->b_count)), le32_to_cpu(BHDR(bh)->h_refcount)); atomic_read(&(bh->b_count)), le32_to_cpu(BHDR(bh)->h_refcount));
if (ext4_xattr_check_block(bh)) { if (ext4_xattr_check_block(bh)) {
bad_block: ext4_error(inode->i_sb, __FUNCTION__, bad_block: ext4_error(inode->i_sb, __FUNCTION__,
"inode %lu: bad block "E3FSBLK, inode->i_ino, "inode %lu: bad block %llu", inode->i_ino,
EXT4_I(inode)->i_file_acl); EXT4_I(inode)->i_file_acl);
error = -EIO; error = -EIO;
goto cleanup; goto cleanup;
...@@ -375,7 +375,7 @@ ext4_xattr_block_list(struct inode *inode, char *buffer, size_t buffer_size) ...@@ -375,7 +375,7 @@ ext4_xattr_block_list(struct inode *inode, char *buffer, size_t buffer_size)
atomic_read(&(bh->b_count)), le32_to_cpu(BHDR(bh)->h_refcount)); atomic_read(&(bh->b_count)), le32_to_cpu(BHDR(bh)->h_refcount));
if (ext4_xattr_check_block(bh)) { if (ext4_xattr_check_block(bh)) {
ext4_error(inode->i_sb, __FUNCTION__, ext4_error(inode->i_sb, __FUNCTION__,
"inode %lu: bad block "E3FSBLK, inode->i_ino, "inode %lu: bad block %llu", inode->i_ino,
EXT4_I(inode)->i_file_acl); EXT4_I(inode)->i_file_acl);
error = -EIO; error = -EIO;
goto cleanup; goto cleanup;
...@@ -647,7 +647,7 @@ ext4_xattr_block_find(struct inode *inode, struct ext4_xattr_info *i, ...@@ -647,7 +647,7 @@ ext4_xattr_block_find(struct inode *inode, struct ext4_xattr_info *i,
le32_to_cpu(BHDR(bs->bh)->h_refcount)); le32_to_cpu(BHDR(bs->bh)->h_refcount));
if (ext4_xattr_check_block(bs->bh)) { if (ext4_xattr_check_block(bs->bh)) {
ext4_error(sb, __FUNCTION__, ext4_error(sb, __FUNCTION__,
"inode %lu: bad block "E3FSBLK, inode->i_ino, "inode %lu: bad block %llu", inode->i_ino,
EXT4_I(inode)->i_file_acl); EXT4_I(inode)->i_file_acl);
error = -EIO; error = -EIO;
goto cleanup; goto cleanup;
...@@ -848,7 +848,7 @@ ext4_xattr_block_set(handle_t *handle, struct inode *inode, ...@@ -848,7 +848,7 @@ ext4_xattr_block_set(handle_t *handle, struct inode *inode,
bad_block: bad_block:
ext4_error(inode->i_sb, __FUNCTION__, ext4_error(inode->i_sb, __FUNCTION__,
"inode %lu: bad block "E3FSBLK, inode->i_ino, "inode %lu: bad block %llu", inode->i_ino,
EXT4_I(inode)->i_file_acl); EXT4_I(inode)->i_file_acl);
goto cleanup; goto cleanup;
...@@ -1077,14 +1077,14 @@ ext4_xattr_delete_inode(handle_t *handle, struct inode *inode) ...@@ -1077,14 +1077,14 @@ ext4_xattr_delete_inode(handle_t *handle, struct inode *inode)
bh = sb_bread(inode->i_sb, EXT4_I(inode)->i_file_acl); bh = sb_bread(inode->i_sb, EXT4_I(inode)->i_file_acl);
if (!bh) { if (!bh) {
ext4_error(inode->i_sb, __FUNCTION__, ext4_error(inode->i_sb, __FUNCTION__,
"inode %lu: block "E3FSBLK" read error", inode->i_ino, "inode %lu: block %llu read error", inode->i_ino,
EXT4_I(inode)->i_file_acl); EXT4_I(inode)->i_file_acl);
goto cleanup; goto cleanup;
} }
if (BHDR(bh)->h_magic != cpu_to_le32(EXT4_XATTR_MAGIC) || if (BHDR(bh)->h_magic != cpu_to_le32(EXT4_XATTR_MAGIC) ||
BHDR(bh)->h_blocks != cpu_to_le32(1)) { BHDR(bh)->h_blocks != cpu_to_le32(1)) {
ext4_error(inode->i_sb, __FUNCTION__, ext4_error(inode->i_sb, __FUNCTION__,
"inode %lu: bad block "E3FSBLK, inode->i_ino, "inode %lu: bad block %llu", inode->i_ino,
EXT4_I(inode)->i_file_acl); EXT4_I(inode)->i_file_acl);
goto cleanup; goto cleanup;
} }
......
...@@ -25,13 +25,7 @@ ...@@ -25,13 +25,7 @@
typedef int ext4_grpblk_t; typedef int ext4_grpblk_t;
/* data type for filesystem-wide blocks number */ /* data type for filesystem-wide blocks number */
typedef sector_t ext4_fsblk_t; typedef unsigned long long ext4_fsblk_t;
#if BITS_PER_LONG == 64
#define E3FSBLK "%lu"
#else
#define E3FSBLK "%llu"
#endif
struct ext4_reserve_window { struct ext4_reserve_window {
ext4_fsblk_t _rsv_start; /* First byte reserved */ ext4_fsblk_t _rsv_start; /* First byte reserved */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment