if (!bh)
ext4_error (sb, "read_block_bitmap",
"Cannot read block bitmap - "
- "block_group = %d, block_bitmap = "E3FSBLK,
+ "block_group = %d, block_bitmap = %llu",
block_group,
ext4_block_bitmap(desc));
error_out:
rsv = list_entry(n, struct ext4_reserve_window_node, rsv_node);
if (verbose)
printk("reservation window 0x%p "
- "start: "E3FSBLK", end: "E3FSBLK"\n",
+ "start: %llu, end: %llu\n",
rsv, rsv->rsv_start, rsv->rsv_end);
if (rsv->rsv_start && rsv->rsv_start >= rsv->rsv_end) {
printk("Bad reservation %p (start >= end)\n",
block + count > ext4_blocks_count(es)) {
ext4_error (sb, "ext4_free_blocks",
"Freeing blocks not in datazone - "
- "block = "E3FSBLK", count = %lu", block, count);
+ "block = %llu, count = %lu", block, count);
goto error_return;
}
sbi->s_itb_per_group))
ext4_error (sb, "ext4_free_blocks",
"Freeing blocks in system zones - "
- "Block = "E3FSBLK", count = %lu",
+ "Block = %llu, count = %lu",
block, count);
/*
bit + i, bitmap_bh->b_data)) {
jbd_unlock_bh_state(bitmap_bh);
ext4_error(sb, __FUNCTION__,
- "bit already cleared for block "E3FSBLK,
+ "bit already cleared for block %llu",
(ext4_fsblk_t)(block + i));
jbd_lock_bh_state(bitmap_bh);
BUFFER_TRACE(bitmap_bh, "bit already cleared");
EXT4_SB(sb)->s_itb_per_group))
ext4_error(sb, "ext4_new_block",
"Allocating block in system zone - "
- "blocks from "E3FSBLK", length %lu",
+ "blocks from %llu, length %lu",
ret_block, num);
performed_allocation = 1;
if (ret_block + num - 1 >= ext4_blocks_count(es)) {
ext4_error(sb, "ext4_new_block",
- "block("E3FSBLK") >= blocks count("E3FSBLK") - "
+ "block(%llu) >= blocks count(%llu) - "
"block_group = %lu, es == %p ", ret_block,
ext4_blocks_count(es), group_no, es);
goto out;
bitmap_count += x;
}
brelse(bitmap_bh);
- printk("ext4_count_free_blocks: stored = "E3FSBLK
- ", computed = "E3FSBLK", "E3FSBLK"\n",
+ printk("ext4_count_free_blocks: stored = %llu"
+ ", computed = %llu, %llu\n",
EXT4_FREE_BLOCKS_COUNT(es),
desc_count, bitmap_count);
return bitmap_count;
ext_debug("path:");
for (k = 0; k <= l; k++, path++) {
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));
} else if (path->p_ext) {
- ext_debug(" %d:%d:"E3FSBLK" ",
+ ext_debug(" %d:%d:%llu ",
le32_to_cpu(path->p_ext->ee_block),
le16_to_cpu(path->p_ext->ee_len),
ext_pblock(path->p_ext));
ex = EXT_FIRST_EXTENT(eh);
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));
}
ext_debug("\n");
}
path->p_ext = l - 1;
- ext_debug(" -> %d:"E3FSBLK":%d ",
+ ext_debug(" -> %d:%llu:%d ",
le32_to_cpu(path->p_ext->ee_block),
ext_pblock(path->p_ext),
le16_to_cpu(path->p_ext->ee_len));
path[depth].p_ext++;
while (path[depth].p_ext <=
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),
ext_pblock(path[depth].p_ext),
le16_to_cpu(path[depth].p_ext->ee_len),
fidx->ei_block = border;
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),
oldblock);
/* copy indexes */
BUG_ON(EXT_MAX_INDEX(path[i].p_hdr) !=
EXT_LAST_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),
idx_pblock(path[i].p_idx),
newblock);
neh = ext_inode_hdr(inode);
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),
le32_to_cpu(fidx->ei_block), idx_pblock(fidx));
/* try to insert block into found extent and return */
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),
le32_to_cpu(ex->ee_block),
le16_to_cpu(ex->ee_len), ext_pblock(ex));
if (!nearex) {
/* 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),
ext_pblock(newext),
le16_to_cpu(newext->ee_len));
len = EXT_MAX_EXTENT(eh) - nearex;
len = (len - 1) * sizeof(struct ext4_extent);
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",
le32_to_cpu(newext->ee_block),
ext_pblock(newext),
BUG_ON(newext->ee_block == nearex->ee_block);
len = (EXT_MAX_EXTENT(eh) - nearex) * sizeof(struct ext4_extent);
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",
le32_to_cpu(newext->ee_block),
ext_pblock(newext),
ex->ee_block = cpu_to_le32(cex->ec_block);
ext4_ext_store_pblock(ex, cex->ec_start);
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) cex->ec_block,
(unsigned long) cex->ec_len,
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)))
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);
ext4_forget(handle, 1, inode, bh, leaf);
ext4_free_blocks(handle, inode, leaf, 1);
ext4_fsblk_t start;
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;
- 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++) {
bh = sb_find_get_block(inode->i_sb, start + i);
ext4_forget(handle, 0, inode, bh, start + i);
if (err)
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));
ex--;
ex_ee_block = le32_to_cpu(ex->ee_block);
path[i].p_idx);
if (ext4_ext_more_to_rm(path + i)) {
/* 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));
memset(path + i + 1, 0, sizeof(*path));
path[i+1].p_bh =
newblock = iblock - ee_block + ee_start;
/* number of remaining blocks in the extent */
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);
ext4_ext_put_in_cache(inode, ee_block, ee_len,
ee_start, EXT4_EXT_CACHE_EXTENT);
newblock = ext4_new_blocks(handle, inode, goal, &allocated, &err);
if (!newblock)
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);
/* try to insert new extent into found leaf and return */
*/
if (!bh) {
ext4_error(inode->i_sb, "ext4_free_branches",
- "Read failure, inode=%lu, block="E3FSBLK,
+ "Read failure, inode=%lu, block=%llu",
inode->i_ino, nr);
continue;
}
if (!bh) {
ext4_error (inode->i_sb, "ext4_get_inode_loc",
"unable to read inode block - "
- "inode=%lu, block="E3FSBLK,
+ "inode=%lu, block=%llu",
inode->i_ino, block);
return -EIO;
}
if (!buffer_uptodate(bh)) {
ext4_error(inode->i_sb, "ext4_get_inode_loc",
"unable to read inode block - "
- "inode=%lu, block="E3FSBLK,
+ "inode=%lu, block=%llu",
inode->i_ino, block);
brelse(bh);
return -EIO;
input->blocks_count);
else if (!(bh = sb_bread(sb, end - 1)))
ext4_warning(sb, __FUNCTION__,
- "Cannot read last block ("E3FSBLK")",
+ "Cannot read last block (%llu)",
end - 1);
else if (outside(input->block_bitmap, start, end))
ext4_warning(sb, __FUNCTION__,
else if (inside(input->block_bitmap, start, metaend))
ext4_warning(sb, __FUNCTION__,
"Block bitmap (%llu) in GDT table"
- " ("E3FSBLK"-"E3FSBLK")",
+ " (%llu-%llu)",
input->block_bitmap, start, metaend - 1);
else if (inside(input->inode_bitmap, start, metaend))
ext4_warning(sb, __FUNCTION__,
"Inode bitmap (%llu) in GDT table"
- " ("E3FSBLK"-"E3FSBLK")",
+ " (%llu-%llu)",
input->inode_bitmap, start, metaend - 1);
else if (inside(input->inode_table, start, metaend) ||
inside(itend - 1, start, metaend))
ext4_warning(sb, __FUNCTION__,
- "Inode table ("E3FSBLK"-"E3FSBLK") overlaps"
- "GDT table ("E3FSBLK"-"E3FSBLK")",
+ "Inode table (%llu-%llu) overlaps"
+ "GDT table (%llu-%llu)",
input->inode_table, itend - 1, start, metaend - 1);
else
err = 0;
if (le32_to_cpu(*p++) !=
grp * EXT4_BLOCKS_PER_GROUP(sb) + blk){
ext4_warning(sb, __FUNCTION__,
- "reserved GDT "E3FSBLK
- " missing grp %d ("E3FSBLK")",
+ "reserved GDT %llu"
+ " missing grp %d (%llu)",
blk, grp,
grp *
(ext4_fsblk_t)EXT4_BLOCKS_PER_GROUP(sb) +
data = (__le32 *)dind->b_data;
if (le32_to_cpu(data[gdb_num % EXT4_ADDR_PER_BLOCK(sb)]) != gdblock) {
ext4_warning(sb, __FUNCTION__,
- "new group %u GDT block "E3FSBLK" not reserved",
+ "new group %u GDT block %llu not reserved",
input->group, gdblock);
err = -EINVAL;
goto exit_dind;
for (res = 0; res < reserved_gdb; res++, blk++) {
if (le32_to_cpu(*data) != blk) {
ext4_warning(sb, __FUNCTION__,
- "reserved block "E3FSBLK
+ "reserved block %llu"
" not at offset %ld",
blk,
(long)(data - (__le32 *)dind->b_data));
o_groups_count = EXT4_SB(sb)->s_groups_count;
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);
if (n_blocks_count == 0 || n_blocks_count == o_blocks_count)
if (n_blocks_count > (sector_t)(~0ULL) >> (sb->s_blocksize_bits - 9)) {
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);
if (sizeof(sector_t) < 8)
ext4_warning(sb, __FUNCTION__,
if (o_blocks_count + add < n_blocks_count)
ext4_warning(sb, __FUNCTION__,
- "will only finish group ("E3FSBLK
+ "will only finish group (%llu"
" blocks, %u new)",
o_blocks_count + add, add);
ext4_journal_dirty_metadata(handle, EXT4_SB(sb)->s_sbh);
sb->s_dirt = 1;
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);
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);
if ((err = ext4_journal_stop(handle)))
goto exit_put;
{
ext4_error (sb, "ext4_check_descriptors",
"Block bitmap for group %d"
- " not in group (block "E3FSBLK")!",
+ " not in group (block %llu)!",
i, block_bitmap);
return 0;
}
{
ext4_error (sb, "ext4_check_descriptors",
"Inode bitmap for group %d"
- " not in group (block "E3FSBLK")!",
+ " not in group (block %llu)!",
i, inode_bitmap);
return 0;
}
{
ext4_error (sb, "ext4_check_descriptors",
"Inode table for group %d"
- " not in group (block "E3FSBLK")!",
+ " not in group (block %llu)!",
i, inode_table);
return 0;
}
atomic_read(&(bh->b_count)), le32_to_cpu(BHDR(bh)->h_refcount));
if (ext4_xattr_check_block(bh)) {
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);
error = -EIO;
goto cleanup;
atomic_read(&(bh->b_count)), le32_to_cpu(BHDR(bh)->h_refcount));
if (ext4_xattr_check_block(bh)) {
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);
error = -EIO;
goto cleanup;
le32_to_cpu(BHDR(bs->bh)->h_refcount));
if (ext4_xattr_check_block(bs->bh)) {
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);
error = -EIO;
goto cleanup;
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);
goto cleanup;
bh = sb_bread(inode->i_sb, EXT4_I(inode)->i_file_acl);
if (!bh) {
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);
goto cleanup;
}
if (BHDR(bh)->h_magic != cpu_to_le32(EXT4_XATTR_MAGIC) ||
BHDR(bh)->h_blocks != cpu_to_le32(1)) {
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);
goto cleanup;
}
typedef int ext4_grpblk_t;
/* data type for filesystem-wide blocks number */
-typedef sector_t ext4_fsblk_t;
-
-#if BITS_PER_LONG == 64
-#define E3FSBLK "%lu"
-#else
-#define E3FSBLK "%llu"
-#endif
+typedef unsigned long long ext4_fsblk_t;
struct ext4_reserve_window {
ext4_fsblk_t _rsv_start; /* First byte reserved */