Replace all remaining calls to vprint(9) with vn_printf(9), and remove

the old macro.

MFC after:	1 month
This commit is contained in:
Edward Tomasz Napierala 2016-08-10 16:12:31 +00:00
parent 66bd4c2eeb
commit 411455a8fb
12 changed files with 16 additions and 17 deletions

View File

@ -132,7 +132,7 @@ smbfs_node_alloc(struct mount *mp, struct vnode *dvp, const char *dirnm,
} }
dnp = dvp ? VTOSMB(dvp) : NULL; dnp = dvp ? VTOSMB(dvp) : NULL;
if (dnp == NULL && dvp != NULL) { if (dnp == NULL && dvp != NULL) {
vprint("smbfs_node_alloc: dead parent vnode", dvp); vn_printf(dvp, "smbfs_node_alloc: dead parent vnode ");
return EINVAL; return EINVAL;
} }
error = vfs_hash_get(mp, smbfs_hash(name, nmlen), LK_EXCLUSIVE, td, error = vfs_hash_get(mp, smbfs_hash(name, nmlen), LK_EXCLUSIVE, td,

View File

@ -1753,9 +1753,9 @@ unionfs_print(struct vop_print_args *ap)
*/ */
if (unp->un_uppervp != NULLVP) if (unp->un_uppervp != NULLVP)
vprint("unionfs: upper", unp->un_uppervp); vn_printf(unp->un_uppervp, "unionfs: upper ");
if (unp->un_lowervp != NULLVP) if (unp->un_lowervp != NULLVP)
vprint("unionfs: lower", unp->un_lowervp); vn_printf(unp->un_lowervp, "unionfs: lower ");
return (0); return (0);
} }

View File

@ -256,7 +256,7 @@ static int
vop_nostrategy (struct vop_strategy_args *ap) vop_nostrategy (struct vop_strategy_args *ap)
{ {
printf("No strategy for buffer at %p\n", ap->a_bp); printf("No strategy for buffer at %p\n", ap->a_bp);
vprint("vnode", ap->a_vp); vn_printf(ap->a_vp, "vnode ");
ap->a_bp->b_ioflags |= BIO_ERROR; ap->a_bp->b_ioflags |= BIO_ERROR;
ap->a_bp->b_error = EOPNOTSUPP; ap->a_bp->b_error = EOPNOTSUPP;
bufdone(ap->a_bp); bufdone(ap->a_bp);
@ -722,7 +722,7 @@ loop2:
} }
BO_UNLOCK(bo); BO_UNLOCK(bo);
if (error == EAGAIN) if (error == EAGAIN)
vprint("fsync: giving up on dirty", vp); vn_printf(vp, "fsync: giving up on dirty ");
return (error); return (error);
} }

View File

@ -721,7 +721,7 @@ unionlookup:
if (needs_exclusive_leaf(dp->v_mount, cnp->cn_flags)) if (needs_exclusive_leaf(dp->v_mount, cnp->cn_flags))
cnp->cn_lkflags = LK_EXCLUSIVE; cnp->cn_lkflags = LK_EXCLUSIVE;
#ifdef NAMEI_DIAGNOSTIC #ifdef NAMEI_DIAGNOSTIC
vprint("lookup in", dp); vn_printf(dp, "lookup in ");
#endif #endif
lkflags_save = cnp->cn_lkflags; lkflags_save = cnp->cn_lkflags;
cnp->cn_lkflags = compute_cn_lkflags(dp->v_mount, cnp->cn_lkflags, cnp->cn_lkflags = compute_cn_lkflags(dp->v_mount, cnp->cn_lkflags,
@ -1007,7 +1007,7 @@ relookup(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp)
* We now have a segment name to search for, and a directory to search. * We now have a segment name to search for, and a directory to search.
*/ */
#ifdef NAMEI_DIAGNOSTIC #ifdef NAMEI_DIAGNOSTIC
vprint("search in:", dp); vn_printf(dp, "search in ");
#endif #endif
if ((error = VOP_LOOKUP(dp, vpp, cnp)) != 0) { if ((error = VOP_LOOKUP(dp, vpp, cnp)) != 0) {
KASSERT(*vpp == NULL, ("leaf should be empty")); KASSERT(*vpp == NULL, ("leaf should be empty"));

View File

@ -510,7 +510,7 @@ vfs_mount_destroy(struct mount *mp)
struct vnode *vp; struct vnode *vp;
TAILQ_FOREACH(vp, &mp->mnt_nvnodelist, v_nmntvnodes) TAILQ_FOREACH(vp, &mp->mnt_nvnodelist, v_nmntvnodes)
vprint("", vp); vn_printf(vp, "dangling vnode ");
panic("unmount: dangling vnode"); panic("unmount: dangling vnode");
} }
KASSERT(TAILQ_EMPTY(&mp->mnt_uppers), ("mnt_uppers")); KASSERT(TAILQ_EMPTY(&mp->mnt_uppers), ("mnt_uppers"));

View File

@ -2645,7 +2645,7 @@ vputx(struct vnode *vp, int func)
error = 0; error = 0;
if (vp->v_usecount != 0) { if (vp->v_usecount != 0) {
vprint("vputx: usecount not zero", vp); vn_printf(vp, "vputx: usecount not zero for vnode ");
panic("vputx: usecount not zero"); panic("vputx: usecount not zero");
} }
@ -3036,7 +3036,7 @@ loop:
busy++; busy++;
#ifdef DIAGNOSTIC #ifdef DIAGNOSTIC
if (busyprt) if (busyprt)
vprint("vflush: busy vnode", vp); vn_printf(vp, "vflush: busy vnode ");
#endif #endif
} }
VOP_UNLOCK(vp, 0); VOP_UNLOCK(vp, 0);
@ -3409,7 +3409,7 @@ DB_SHOW_COMMAND(lockedvnods, lockedvnodes)
TAILQ_FOREACH(mp, &mountlist, mnt_list) { TAILQ_FOREACH(mp, &mountlist, mnt_list) {
TAILQ_FOREACH(vp, &mp->mnt_nvnodelist, v_nmntvnodes) { TAILQ_FOREACH(vp, &mp->mnt_nvnodelist, v_nmntvnodes) {
if (vp->v_type != VMARKER && VOP_ISLOCKED(vp)) if (vp->v_type != VMARKER && VOP_ISLOCKED(vp))
vprint("", vp); vn_printf(vp, "vnode ");
} }
} }
} }

View File

@ -655,7 +655,6 @@ int vtruncbuf(struct vnode *vp, struct ucred *cred, off_t length,
int blksize); int blksize);
void vunref(struct vnode *); void vunref(struct vnode *);
void vn_printf(struct vnode *vp, const char *fmt, ...) __printflike(2,3); void vn_printf(struct vnode *vp, const char *fmt, ...) __printflike(2,3);
#define vprint(label, vp) vn_printf((vp), "%s\n", (label))
int vrecycle(struct vnode *vp); int vrecycle(struct vnode *vp);
int vn_bmap_seekhole(struct vnode *vp, u_long cmd, off_t *off, int vn_bmap_seekhole(struct vnode *vp, u_long cmd, off_t *off,
struct ucred *cred); struct ucred *cred);

View File

@ -558,7 +558,7 @@ loop:
} }
VI_UNLOCK(xvp); VI_UNLOCK(xvp);
if (snapdebug) if (snapdebug)
vprint("ffs_snapshot: busy vnode", xvp); vn_printf(xvp, "ffs_snapshot: busy vnode ");
if (VOP_GETATTR(xvp, &vat, td->td_ucred) == 0 && if (VOP_GETATTR(xvp, &vat, td->td_ucred) == 0 &&
vat.va_nlink > 0) { vat.va_nlink > 0) {
VOP_UNLOCK(xvp, 0); VOP_UNLOCK(xvp, 0);

View File

@ -342,7 +342,7 @@ next:
goto loop; goto loop;
#ifdef INVARIANTS #ifdef INVARIANTS
if (!vn_isdisk(vp, NULL)) if (!vn_isdisk(vp, NULL))
vprint("ffs_fsync: dirty", vp); vn_printf(vp, "ffs_fsync: dirty ");
#endif #endif
} }
BO_UNLOCK(bo); BO_UNLOCK(bo);

View File

@ -1136,7 +1136,7 @@ ufs_direnter(dvp, tvp, dirp, cnp, newdirbp, isrename)
error = UFS_TRUNCATE(dvp, (off_t)dp->i_endoff, error = UFS_TRUNCATE(dvp, (off_t)dp->i_endoff,
IO_NORMAL | (DOINGASYNC(dvp) ? 0 : IO_SYNC), cr); IO_NORMAL | (DOINGASYNC(dvp) ? 0 : IO_SYNC), cr);
if (error != 0) if (error != 0)
vprint("ufs_direnter: failed to truncate", dvp); vn_printf(dvp, "ufs_direnter: failed to truncate ");
#ifdef UFS_DIRHASH #ifdef UFS_DIRHASH
if (error == 0 && dp->i_dirhash != NULL) if (error == 0 && dp->i_dirhash != NULL)
ufsdirhash_dirtrunc(dp, dp->i_endoff); ufsdirhash_dirtrunc(dp, dp->i_endoff);

View File

@ -469,7 +469,7 @@ chkdquot(struct inode *ip)
continue; continue;
if (ip->i_dquot[i] == NODQUOT) { if (ip->i_dquot[i] == NODQUOT) {
UFS_UNLOCK(ump); UFS_UNLOCK(ump);
vprint("chkdquot: missing dquot", ITOV(ip)); vn_printf(ITOV(ip), "chkdquot: missing dquot ");
panic("chkdquot: missing dquot"); panic("chkdquot: missing dquot");
} }
} }

View File

@ -471,7 +471,7 @@ vm_object_vndeallocate(vm_object_t object)
KASSERT(vp != NULL, ("vm_object_vndeallocate: missing vp")); KASSERT(vp != NULL, ("vm_object_vndeallocate: missing vp"));
#ifdef INVARIANTS #ifdef INVARIANTS
if (object->ref_count == 0) { if (object->ref_count == 0) {
vprint("vm_object_vndeallocate", vp); vn_printf(vp, "vm_object_vndeallocate ");
panic("vm_object_vndeallocate: bad object reference count"); panic("vm_object_vndeallocate: bad object reference count");
} }
#endif #endif