mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-12 09:58:36 +00:00
Warning fixes for 64 bits platforms. This eliminates all the
warnings I have had in the FFS code on sparc64. Reviewed by: mckusick
This commit is contained in:
parent
848d14193d
commit
cfbf0a4678
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=98687
@ -225,7 +225,7 @@ ffs_realloccg(ip, lbprev, bpref, osize, nsize, cred, bpp)
|
||||
freespace(fs, fs->fs_minfree) - numfrags(fs, nsize - osize) < 0)
|
||||
goto nospace;
|
||||
if ((bprev = DIP(ip, i_db[lbprev])) == 0) {
|
||||
printf("dev = %s, bsize = %ld, bprev = %lld, fs = %s\n",
|
||||
printf("dev = %s, bsize = %ld, bprev = %jd, fs = %s\n",
|
||||
devtoname(ip->i_dev), (long)fs->fs_bsize, (intmax_t)bprev,
|
||||
fs->fs_fsmnt);
|
||||
panic("ffs_realloccg: bad bprev");
|
||||
@ -1692,7 +1692,7 @@ ffs_blkfree(fs, devvp, bno, size, inum)
|
||||
}
|
||||
#endif
|
||||
if ((u_int)bno >= fs->fs_size) {
|
||||
printf("bad block %lld, ino %lu\n", (intmax_t)bno,
|
||||
printf("bad block %jd, ino %lu\n", (intmax_t)bno,
|
||||
(u_long)inum);
|
||||
ffs_fserr(fs, inum, "bad block");
|
||||
return;
|
||||
@ -1718,7 +1718,7 @@ ffs_blkfree(fs, devvp, bno, size, inum)
|
||||
brelse(bp);
|
||||
return;
|
||||
}
|
||||
printf("dev = %s, block = %lld, fs = %s\n",
|
||||
printf("dev = %s, block = %jd, fs = %s\n",
|
||||
devtoname(dev), (intmax_t)bno, fs->fs_fsmnt);
|
||||
panic("ffs_blkfree: freeing free block");
|
||||
}
|
||||
@ -1740,7 +1740,7 @@ ffs_blkfree(fs, devvp, bno, size, inum)
|
||||
frags = numfrags(fs, size);
|
||||
for (i = 0; i < frags; i++) {
|
||||
if (isset(blksfree, cgbno + i)) {
|
||||
printf("dev = %s, block = %lld, fs = %s\n",
|
||||
printf("dev = %s, block = %jd, fs = %s\n",
|
||||
devtoname(dev), (intmax_t)(bno + i),
|
||||
fs->fs_fsmnt);
|
||||
panic("ffs_blkfree: freeing free frag");
|
||||
|
@ -1400,7 +1400,7 @@ ffs_snapblkfree(fs, devvp, bno, size, inum)
|
||||
if (size == fs->fs_bsize) {
|
||||
#ifdef DEBUG
|
||||
if (snapdebug)
|
||||
printf("%s %d lbn %lld from inum %d\n",
|
||||
printf("%s %d lbn %jd from inum %d\n",
|
||||
"Grabonremove: snapino", ip->i_number,
|
||||
(intmax_t)lbn, inum);
|
||||
#endif
|
||||
@ -1437,7 +1437,7 @@ ffs_snapblkfree(fs, devvp, bno, size, inum)
|
||||
}
|
||||
#ifdef DEBUG
|
||||
if (snapdebug)
|
||||
printf("%s%d lbn %lld %s %d size %ld to blkno %lld\n",
|
||||
printf("%s%d lbn %jd %s %d size %ld to blkno %jd\n",
|
||||
"Copyonremove: snapino ", ip->i_number,
|
||||
(intmax_t)lbn, "for inum", inum, size,
|
||||
(intmax_t)cbp->b_blkno);
|
||||
@ -1653,13 +1653,13 @@ ffs_copyonwrite(devvp, bp)
|
||||
}
|
||||
#ifdef DEBUG
|
||||
if (snapdebug) {
|
||||
printf("Copyonwrite: snapino %d lbn %lld for ",
|
||||
printf("Copyonwrite: snapino %d lbn %jd for ",
|
||||
ip->i_number, (intmax_t)lbn);
|
||||
if (bp->b_vp == devvp)
|
||||
printf("fs metadata");
|
||||
else
|
||||
printf("inum %d", VTOI(bp->b_vp)->i_number);
|
||||
printf(" lblkno %lld to blkno %lld\n",
|
||||
printf(" lblkno %jd to blkno %jd\n",
|
||||
(intmax_t)bp->b_lblkno, (intmax_t)cbp->b_blkno);
|
||||
}
|
||||
#endif
|
||||
|
@ -1460,7 +1460,7 @@ allocdirect_merge(adphead, newadp, oldadp)
|
||||
newadp->ad_oldsize != oldadp->ad_newsize ||
|
||||
newadp->ad_lbn >= NDADDR) {
|
||||
FREE_LOCK(&lk);
|
||||
panic("%s %lld != new %lld || old size %ld != new %ld",
|
||||
panic("%s %jd != new %jd || old size %ld != new %ld",
|
||||
"allocdirect_merge: old blkno",
|
||||
(intmax_t)newadp->ad_oldblkno,
|
||||
(intmax_t)oldadp->ad_newblkno,
|
||||
@ -3402,7 +3402,7 @@ initiate_write_inodeblock_ufs1(inodedep, bp)
|
||||
if (adp->ad_lbn < NDADDR &&
|
||||
dp->di_db[adp->ad_lbn] != adp->ad_newblkno) {
|
||||
FREE_LOCK(&lk);
|
||||
panic("%s: direct pointer #%lld mismatch %d != %lld",
|
||||
panic("%s: direct pointer #%jd mismatch %d != %jd",
|
||||
"softdep_write_inodeblock",
|
||||
(intmax_t)adp->ad_lbn,
|
||||
dp->di_db[adp->ad_lbn],
|
||||
@ -3411,7 +3411,7 @@ initiate_write_inodeblock_ufs1(inodedep, bp)
|
||||
if (adp->ad_lbn >= NDADDR &&
|
||||
dp->di_ib[adp->ad_lbn - NDADDR] != adp->ad_newblkno) {
|
||||
FREE_LOCK(&lk);
|
||||
panic("%s: indirect pointer #%lld mismatch %d != %lld",
|
||||
panic("%s: indirect pointer #%jd mismatch %d != %jd",
|
||||
"softdep_write_inodeblock",
|
||||
(intmax_t)adp->ad_lbn - NDADDR,
|
||||
dp->di_ib[adp->ad_lbn - NDADDR],
|
||||
@ -3554,7 +3554,7 @@ initiate_write_inodeblock_ufs2(inodedep, bp)
|
||||
if (adp->ad_lbn < NDADDR &&
|
||||
dp->di_db[adp->ad_lbn] != adp->ad_newblkno) {
|
||||
FREE_LOCK(&lk);
|
||||
panic("%s: direct pointer #%lld mismatch %lld != %lld",
|
||||
panic("%s: direct pointer #%jd mismatch %jd != %jd",
|
||||
"softdep_write_inodeblock",
|
||||
(intmax_t)adp->ad_lbn,
|
||||
(intmax_t)dp->di_db[adp->ad_lbn],
|
||||
@ -3563,7 +3563,7 @@ initiate_write_inodeblock_ufs2(inodedep, bp)
|
||||
if (adp->ad_lbn >= NDADDR &&
|
||||
dp->di_ib[adp->ad_lbn - NDADDR] != adp->ad_newblkno) {
|
||||
FREE_LOCK(&lk);
|
||||
panic("%s indirect pointer #%lld mismatch %lld != %lld",
|
||||
panic("%s indirect pointer #%jd mismatch %jd != %jd",
|
||||
"softdep_write_inodeblock:",
|
||||
(intmax_t)adp->ad_lbn - NDADDR,
|
||||
(intmax_t)dp->di_ib[adp->ad_lbn - NDADDR],
|
||||
@ -3954,7 +3954,7 @@ handle_written_inodeblock(inodedep, bp)
|
||||
if (adp->ad_lbn < NDADDR) {
|
||||
if (dp1->di_db[adp->ad_lbn]!=adp->ad_oldblkno) {
|
||||
lk.lkt_held = NOHOLDER;
|
||||
panic("%s %s #%lld mismatch %d != %lld",
|
||||
panic("%s %s #%jd mismatch %d != %jd",
|
||||
"handle_written_inodeblock:",
|
||||
"direct pointer",
|
||||
(intmax_t)adp->ad_lbn,
|
||||
@ -3965,7 +3965,7 @@ handle_written_inodeblock(inodedep, bp)
|
||||
} else {
|
||||
if (dp1->di_ib[adp->ad_lbn - NDADDR] != 0) {
|
||||
lk.lkt_held = NOHOLDER;
|
||||
panic("%s: %s #%lld allocated as %d",
|
||||
panic("%s: %s #%jd allocated as %d",
|
||||
"handle_written_inodeblock",
|
||||
"indirect pointer",
|
||||
(intmax_t)adp->ad_lbn - NDADDR,
|
||||
@ -3978,7 +3978,7 @@ handle_written_inodeblock(inodedep, bp)
|
||||
if (adp->ad_lbn < NDADDR) {
|
||||
if (dp2->di_db[adp->ad_lbn]!=adp->ad_oldblkno) {
|
||||
lk.lkt_held = NOHOLDER;
|
||||
panic("%s: %s #%lld %s %lld != %lld",
|
||||
panic("%s: %s #%jd %s %jd != %jd",
|
||||
"handle_written_inodeblock",
|
||||
"direct pointer",
|
||||
(intmax_t)adp->ad_lbn, "mismatch",
|
||||
@ -3989,7 +3989,7 @@ handle_written_inodeblock(inodedep, bp)
|
||||
} else {
|
||||
if (dp2->di_ib[adp->ad_lbn - NDADDR] != 0) {
|
||||
lk.lkt_held = NOHOLDER;
|
||||
panic("%s: %s #%lld allocated as %lld",
|
||||
panic("%s: %s #%jd allocated as %jd",
|
||||
"handle_written_inodeblock",
|
||||
"indirect pointer",
|
||||
(intmax_t)adp->ad_lbn - NDADDR,
|
||||
|
@ -200,7 +200,7 @@ ffs_checkoverlap(bp, ip)
|
||||
ep->b_blkno + btodb(ep->b_bcount) <= start)
|
||||
continue;
|
||||
vprint("Disk overlap", vp);
|
||||
printf("\tstart %llu, end %llu overlap start %llu, end %llu\n",
|
||||
printf("\tstart %jd, end %jd overlap start %jd, end %jd\n",
|
||||
(intmax_t)start, (intmax_t)last, (intmax_t)ep->b_blkno,
|
||||
(intmax_t)(ep->b_blkno + btodb(ep->b_bcount) - 1));
|
||||
panic("ffs_checkoverlap: Disk buffer overlap");
|
||||
|
@ -204,7 +204,7 @@ ffs_mount(mp, path, data, ndp, td)
|
||||
}
|
||||
if (fs->fs_pendingblocks != 0 ||
|
||||
fs->fs_pendinginodes != 0) {
|
||||
printf("%s: %s: blocks %lld files %d\n",
|
||||
printf("%s: %s: blocks %jd files %d\n",
|
||||
fs->fs_fsmnt, "update error",
|
||||
(intmax_t)fs->fs_pendingblocks,
|
||||
fs->fs_pendinginodes);
|
||||
@ -447,7 +447,7 @@ ffs_reload(mp, cred, td)
|
||||
mp->mnt_maxsymlinklen = fs->fs_maxsymlinklen;
|
||||
ffs_oldfscompat_read(fs, VFSTOUFS(mp), sblockloc);
|
||||
if (fs->fs_pendingblocks != 0 || fs->fs_pendinginodes != 0) {
|
||||
printf("%s: reload pending error: blocks %lld files %d\n",
|
||||
printf("%s: reload pending error: blocks %jd files %d\n",
|
||||
fs->fs_fsmnt, (intmax_t)fs->fs_pendingblocks,
|
||||
fs->fs_pendinginodes);
|
||||
fs->fs_pendingblocks = 0;
|
||||
@ -658,7 +658,7 @@ ffs_mountfs(devvp, mp, td, malloctype)
|
||||
}
|
||||
if ((fs->fs_pendingblocks != 0 || fs->fs_pendinginodes != 0) &&
|
||||
(mp->mnt_flag & MNT_FORCE)) {
|
||||
printf("%s: lost blocks %lld files %d\n", fs->fs_fsmnt,
|
||||
printf("%s: lost blocks %jd files %d\n", fs->fs_fsmnt,
|
||||
(intmax_t)fs->fs_pendingblocks,
|
||||
fs->fs_pendinginodes);
|
||||
fs->fs_pendingblocks = 0;
|
||||
@ -666,7 +666,7 @@ ffs_mountfs(devvp, mp, td, malloctype)
|
||||
}
|
||||
}
|
||||
if (fs->fs_pendingblocks != 0 || fs->fs_pendinginodes != 0) {
|
||||
printf("%s: mount pending error: blocks %lld files %d\n",
|
||||
printf("%s: mount pending error: blocks %jd files %d\n",
|
||||
fs->fs_fsmnt, (intmax_t)fs->fs_pendingblocks,
|
||||
fs->fs_pendinginodes);
|
||||
fs->fs_pendingblocks = 0;
|
||||
@ -933,7 +933,7 @@ ffs_unmount(mp, mntflags, td)
|
||||
}
|
||||
fs = ump->um_fs;
|
||||
if (fs->fs_pendingblocks != 0 || fs->fs_pendinginodes != 0) {
|
||||
printf("%s: unmount pending error: blocks %lld files %d\n",
|
||||
printf("%s: unmount pending error: blocks %jd files %d\n",
|
||||
fs->fs_fsmnt, (intmax_t)fs->fs_pendingblocks,
|
||||
fs->fs_pendinginodes);
|
||||
fs->fs_pendingblocks = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user