Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/ufs/lfs print inode number in an assert I keep hitting a...
details: https://anonhg.NetBSD.org/src/rev/daf611280be4
branches: trunk
changeset: 352101:daf611280be4
user: maya <maya%NetBSD.org@localhost>
date: Wed Mar 15 21:28:41 2017 +0000
description:
print inode number in an assert I keep hitting and the adjacent one.
use PRIx64 for printing inode number elsewhere.
diffstat:
sys/ufs/lfs/lfs_inode.c | 16 ++++++++--------
sys/ufs/lfs/lfs_vnops.c | 13 ++++++-------
2 files changed, 14 insertions(+), 15 deletions(-)
diffs (107 lines):
diff -r b1b58c501d12 -r daf611280be4 sys/ufs/lfs/lfs_inode.c
--- a/sys/ufs/lfs/lfs_inode.c Wed Mar 15 20:25:41 2017 +0000
+++ b/sys/ufs/lfs/lfs_inode.c Wed Mar 15 21:28:41 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_inode.c,v 1.148 2017/03/13 13:45:53 riastradh Exp $ */
+/* $NetBSD: lfs_inode.c,v 1.149 2017/03/15 21:28:41 maya Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lfs_inode.c,v 1.148 2017/03/13 13:45:53 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_inode.c,v 1.149 2017/03/15 21:28:41 maya Exp $");
#if defined(_KERNEL_OPT)
#include "opt_quota.h"
@@ -149,7 +149,7 @@
mutex_enter(vp->v_interlock);
while ((updflags & (UPDATE_WAIT|UPDATE_DIROP)) == UPDATE_WAIT &&
WRITEINPROG(vp)) {
- DLOG((DLOG_SEG, "lfs_update: sleeping on ino %d"
+ DLOG((DLOG_SEG, "lfs_update: sleeping on ino %"PRIx64
" (in progress)\n", ip->i_number));
cv_wait(&vp->v_cv, vp->v_interlock);
}
@@ -168,7 +168,7 @@
mutex_enter(&lfs_lock);
++fs->lfs_diropwait;
while (vp->v_uflag & VU_DIROP) {
- DLOG((DLOG_DIROP, "lfs_update: sleeping on inode %d"
+ DLOG((DLOG_DIROP, "lfs_update: sleeping on inode %"PRIx64
" (dirops)\n", ip->i_number));
DLOG((DLOG_DIROP, "lfs_update: vflags 0x%x, iflags"
" 0x%x\n",
@@ -590,12 +590,12 @@
KASSERTMSG((oip->i_size != 0 ||
lfs_dino_getblocks(fs, oip->i_din) == 0),
- "truncate to 0 but %jd blks/%jd effblks",
- lfs_dino_getblocks(fs, oip->i_din),
+ "ino %"PRIx64" truncate to 0 but %jd blks/%jd effblks",
+ oip->i_number, lfs_dino_getblocks(fs, oip->i_din),
oip->i_lfs_effnblks);
KASSERTMSG((oip->i_size != 0 || oip->i_lfs_effnblks == 0),
- "truncate to 0 but %jd blks/%jd effblks",
- lfs_dino_getblocks(fs, oip->i_din),
+ "ino %"PRIx64" truncate to 0 but %jd blks/%jd effblks",
+ oip->i_number, lfs_dino_getblocks(fs, oip->i_din),
oip->i_lfs_effnblks);
/*
diff -r b1b58c501d12 -r daf611280be4 sys/ufs/lfs/lfs_vnops.c
--- a/sys/ufs/lfs/lfs_vnops.c Wed Mar 15 20:25:41 2017 +0000
+++ b/sys/ufs/lfs/lfs_vnops.c Wed Mar 15 21:28:41 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_vnops.c,v 1.304 2016/07/13 16:26:26 maya Exp $ */
+/* $NetBSD: lfs_vnops.c,v 1.305 2017/03/15 21:28:41 maya Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -125,7 +125,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lfs_vnops.c,v 1.304 2016/07/13 16:26:26 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_vnops.c,v 1.305 2017/03/15 21:28:41 maya Exp $");
#ifdef _KERNEL_OPT
#include "opt_compat_netbsd.h"
@@ -539,7 +539,7 @@
*/
if (ap->a_vp->v_uflag & VU_DIROP) {
struct inode *ip = VTOI(ap->a_vp);
- printf("lfs_inactive: inactivating VU_DIROP? ino = %d\n", (int)ip->i_number);
+ printf("lfs_inactive: inactivating VU_DIROP? ino = %"PRIx64"\n", ip->i_number);
}
#endif /* DIAGNOSTIC */
@@ -837,8 +837,7 @@
* Can this ever happen (barring hardware failure)?
*/
if ((error = VOP_FSYNC(*vpp, NOCRED, FSYNC_WAIT, 0, 0)) != 0) {
- panic("lfs_mknod: couldn't fsync (ino %llu)",
- (unsigned long long)ino);
+ panic("lfs_mknod: couldn't fsync (ino %"PRIx64")", ino);
/* return (error); */
}
@@ -1520,14 +1519,14 @@
if (sn == lfs_dtosn(fs, fs->lfs_cleanint[i]) &&
tbn >= fs->lfs_cleanint[i]) {
DLOG((DLOG_CLEAN,
- "lfs_strategy: ino %d lbn %" PRId64
+ "lfs_strategy: ino %"PRIx64" lbn %" PRId64
" ind %d sn %d fsb %" PRIx64
" given sn %d fsb %" PRIx64 "\n",
ip->i_number, bp->b_lblkno, i,
lfs_dtosn(fs, fs->lfs_cleanint[i]),
fs->lfs_cleanint[i], sn, tbn));
DLOG((DLOG_CLEAN,
- "lfs_strategy: sleeping on ino %d lbn %"
+ "lfs_strategy: sleeping on ino %"PRIx64" lbn %"
PRId64 "\n", ip->i_number, bp->b_lblkno));
mutex_enter(&lfs_lock);
if (LFS_SEGLOCK_HELD(fs) && fs->lfs_iocount) {
Home |
Main Index |
Thread Index |
Old Index