maxrootrecs = xfs_bmdr_maxrecs(sz, 0);
minleafrecs = mp->m_bmap_dmnr[0];
minnoderecs = mp->m_bmap_dmnr[1];
- maxblocks = (maxleafents + minleafrecs - 1) / minleafrecs;
+ maxblocks = howmany_64(maxleafents, minleafrecs);
for (level = 1; maxblocks > 1; level++) {
if (maxblocks <= maxrootrecs)
maxblocks = 1;
if (bp_release)
xfs_trans_brelse(NULL, bp);
error_norelse:
- xfs_warn(mp, "%s: BAD after btree leaves for %d extents",
+ xfs_warn(mp, "%s: BAD after btree leaves for %llu extents",
__func__, i);
xfs_err(mp, "%s: CORRUPTED BTREE OR SOMETHING", __func__);
xfs_force_shutdown(mp, SHUTDOWN_CORRUPT_INCORE);
*last_key = irec.br_startoff;
if (i > 0 && op + cp > irec.br_startoff) {
do_warn(
-_("bmap rec out of order, inode %" PRIu64" entry %d "
+_("bmap rec out of order, inode %" PRIu64" entry %" PRIu64 " "
"[o s c] [%" PRIu64 " %" PRIu64 " %" PRIu64 "], "
- "%d [%" PRIu64 " %" PRIu64 " %" PRIu64 "]\n"),
+ "%" PRIu64 " [%" PRIu64 " %" PRIu64 " %" PRIu64 "]\n"),
ino, i, irec.br_startoff, irec.br_startblock,
irec.br_blockcount, i - 1, op, sp, cp);
goto done;
*/
if (numrecs > max_symlink_blocks) {
do_warn(
-_("bad number of extents (%d) in symlink %" PRIu64 " data fork\n"),
+_("bad number of extents (%" PRIu64 ") in symlink %" PRIu64 " data fork\n"),
numrecs, lino);
return(1);
}
libxfs_bmbt_disk_get_all((rp +i), &irec);
if (irec.br_startoff != expected_offset) {
do_warn(
-_("bad extent #%d offset (%" PRIu64 ") in symlink %" PRIu64 " data fork\n"),
+_("bad extent #%" PRIu64 " offset (%" PRIu64 ") in symlink %" PRIu64 " data fork\n"),
i, irec.br_startoff, lino);
return(1);
}
if (irec.br_blockcount == 0 || irec.br_blockcount > max_blocks) {
do_warn(
-_("bad extent #%d count (%" PRIu64 ") in symlink %" PRIu64 " data fork\n"),
+_("bad extent #%" PRIu64 " count (%" PRIu64 ") in symlink %" PRIu64 " data fork\n"),
i, irec.br_blockcount, lino);
return(1);
}
}
if (mp->m_sb.sb_rblocks == 0 && dnextents != 0) {
do_warn(
-_("bad # of extents (%u) for realtime summary inode %" PRIu64 "\n"),
+_("bad # of extents (%" PRIu64 ") for realtime summary inode %" PRIu64 "\n"),
dnextents, lino);
return 1;
}
}
if (mp->m_sb.sb_rblocks == 0 && dnextents != 0) {
do_warn(
-_("bad # of extents (%u) for realtime bitmap inode %" PRIu64 "\n"),
+_("bad # of extents (%" PRIu64 ") for realtime bitmap inode %" PRIu64 "\n"),
dnextents, lino);
return 1;
}
if (nextents != dnextents) {
if (!no_modify) {
do_warn(
-_("correcting nextents for inode %" PRIu64 ", was %d - counted %" PRIu64 "\n"),
+_("correcting nextents for inode %" PRIu64 ", was %" PRIu64 " - counted %" PRIu64 "\n"),
lino, dnextents, nextents);
dino->di_nextents = cpu_to_be32(nextents);
*dirty = 1;
} else {
do_warn(
-_("bad nextents %d for inode %" PRIu64 ", would reset to %" PRIu64 "\n"),
+_("bad nextents %" PRIu64 " for inode %" PRIu64 ", would reset to %" PRIu64 "\n"),
dnextents, lino, nextents);
}
}
if (anextents != danextents) {
if (!no_modify) {
do_warn(
-_("correcting anextents for inode %" PRIu64 ", was %d - counted %" PRIu64 "\n"),
+_("correcting anextents for inode %" PRIu64 ", was %" PRIu64 " - counted %" PRIu64 "\n"),
lino, danextents, anextents);
dino->di_anextents = cpu_to_be16(anextents);
*dirty = 1;
} else {
do_warn(
-_("bad anextents %d for inode %" PRIu64 ", would reset to %" PRIu64 "\n"),
+_("bad anextents %" PRIu64 " for inode %" PRIu64 ", would reset to %" PRIu64 "\n"),
danextents, lino, anextents);
}
}
if (numrecs > mp->m_bmap_dmxr[0] || (isroot == 0 && numrecs <
mp->m_bmap_dmnr[0])) {
do_warn(
-_("inode %" PRIu64 " bad # of bmap records (%u, min - %u, max - %u)\n"),
+_("inode %" PRIu64 " bad # of bmap records (%" PRIu64 ", min - %u, max - %u)\n"),
ino, numrecs, mp->m_bmap_dmnr[0],
mp->m_bmap_dmxr[0]);
return(1);
if (numrecs > mp->m_bmap_dmxr[1] || (isroot == 0 && numrecs <
mp->m_bmap_dmnr[1])) {
do_warn(
-_("inode %" PRIu64 " bad # of bmap records (%u, min - %u, max - %u)\n"),
+_("inode %" PRIu64 " bad # of bmap records (%" PRIu64 ", min - %u, max - %u)\n"),
ino, numrecs, mp->m_bmap_dmnr[1], mp->m_bmap_dmxr[1]);
return(1);
}