From 411455a8fbcfbb51e60fb5f5d4a02d6e76c0a88c Mon Sep 17 00:00:00 2001 From: Edward Tomasz Napierala Date: Wed, 10 Aug 2016 16:12:31 +0000 Subject: [PATCH] Replace all remaining calls to vprint(9) with vn_printf(9), and remove the old macro. MFC after: 1 month --- sys/fs/smbfs/smbfs_node.c | 2 +- sys/fs/unionfs/union_vnops.c | 4 ++-- sys/kern/vfs_default.c | 4 ++-- sys/kern/vfs_lookup.c | 4 ++-- sys/kern/vfs_mount.c | 2 +- sys/kern/vfs_subr.c | 6 +++--- sys/sys/vnode.h | 1 - sys/ufs/ffs/ffs_snapshot.c | 2 +- sys/ufs/ffs/ffs_vnops.c | 2 +- sys/ufs/ufs/ufs_lookup.c | 2 +- sys/ufs/ufs/ufs_quota.c | 2 +- sys/vm/vm_object.c | 2 +- 12 files changed, 16 insertions(+), 17 deletions(-) diff --git a/sys/fs/smbfs/smbfs_node.c b/sys/fs/smbfs/smbfs_node.c index 05d19e98ef97..bf4223336f59 100644 --- a/sys/fs/smbfs/smbfs_node.c +++ b/sys/fs/smbfs/smbfs_node.c @@ -132,7 +132,7 @@ smbfs_node_alloc(struct mount *mp, struct vnode *dvp, const char *dirnm, } dnp = dvp ? VTOSMB(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; } error = vfs_hash_get(mp, smbfs_hash(name, nmlen), LK_EXCLUSIVE, td, diff --git a/sys/fs/unionfs/union_vnops.c b/sys/fs/unionfs/union_vnops.c index 6b60dbd47fb5..16cc438a2205 100644 --- a/sys/fs/unionfs/union_vnops.c +++ b/sys/fs/unionfs/union_vnops.c @@ -1753,9 +1753,9 @@ unionfs_print(struct vop_print_args *ap) */ if (unp->un_uppervp != NULLVP) - vprint("unionfs: upper", unp->un_uppervp); + vn_printf(unp->un_uppervp, "unionfs: upper "); if (unp->un_lowervp != NULLVP) - vprint("unionfs: lower", unp->un_lowervp); + vn_printf(unp->un_lowervp, "unionfs: lower "); return (0); } diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c index a7977bf9cf11..8679ad782a74 100644 --- a/sys/kern/vfs_default.c +++ b/sys/kern/vfs_default.c @@ -256,7 +256,7 @@ static int vop_nostrategy (struct vop_strategy_args *ap) { 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_error = EOPNOTSUPP; bufdone(ap->a_bp); @@ -722,7 +722,7 @@ loop2: } BO_UNLOCK(bo); if (error == EAGAIN) - vprint("fsync: giving up on dirty", vp); + vn_printf(vp, "fsync: giving up on dirty "); return (error); } diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index f33dc8bd7f06..07244c99ea29 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -721,7 +721,7 @@ unionlookup: if (needs_exclusive_leaf(dp->v_mount, cnp->cn_flags)) cnp->cn_lkflags = LK_EXCLUSIVE; #ifdef NAMEI_DIAGNOSTIC - vprint("lookup in", dp); + vn_printf(dp, "lookup in "); #endif lkflags_save = 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. */ #ifdef NAMEI_DIAGNOSTIC - vprint("search in:", dp); + vn_printf(dp, "search in "); #endif if ((error = VOP_LOOKUP(dp, vpp, cnp)) != 0) { KASSERT(*vpp == NULL, ("leaf should be empty")); diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index 247714f07cb4..6e45a2c71b1e 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -510,7 +510,7 @@ vfs_mount_destroy(struct mount *mp) struct vnode *vp; TAILQ_FOREACH(vp, &mp->mnt_nvnodelist, v_nmntvnodes) - vprint("", vp); + vn_printf(vp, "dangling vnode "); panic("unmount: dangling vnode"); } KASSERT(TAILQ_EMPTY(&mp->mnt_uppers), ("mnt_uppers")); diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 14991f2d8a5a..b369b9760ace 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -2645,7 +2645,7 @@ vputx(struct vnode *vp, int func) error = 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"); } @@ -3036,7 +3036,7 @@ loop: busy++; #ifdef DIAGNOSTIC if (busyprt) - vprint("vflush: busy vnode", vp); + vn_printf(vp, "vflush: busy vnode "); #endif } VOP_UNLOCK(vp, 0); @@ -3409,7 +3409,7 @@ DB_SHOW_COMMAND(lockedvnods, lockedvnodes) TAILQ_FOREACH(mp, &mountlist, mnt_list) { TAILQ_FOREACH(vp, &mp->mnt_nvnodelist, v_nmntvnodes) { if (vp->v_type != VMARKER && VOP_ISLOCKED(vp)) - vprint("", vp); + vn_printf(vp, "vnode "); } } } diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index eb0672eb3009..8c6bbfd17076 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -655,7 +655,6 @@ int vtruncbuf(struct vnode *vp, struct ucred *cred, off_t length, int blksize); void vunref(struct vnode *); 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 vn_bmap_seekhole(struct vnode *vp, u_long cmd, off_t *off, struct ucred *cred); diff --git a/sys/ufs/ffs/ffs_snapshot.c b/sys/ufs/ffs/ffs_snapshot.c index 59ae322686d8..5ef439f6a1a8 100644 --- a/sys/ufs/ffs/ffs_snapshot.c +++ b/sys/ufs/ffs/ffs_snapshot.c @@ -558,7 +558,7 @@ loop: } VI_UNLOCK(xvp); if (snapdebug) - vprint("ffs_snapshot: busy vnode", xvp); + vn_printf(xvp, "ffs_snapshot: busy vnode "); if (VOP_GETATTR(xvp, &vat, td->td_ucred) == 0 && vat.va_nlink > 0) { VOP_UNLOCK(xvp, 0); diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c index 5a70e5c1da15..69182850ffe2 100644 --- a/sys/ufs/ffs/ffs_vnops.c +++ b/sys/ufs/ffs/ffs_vnops.c @@ -342,7 +342,7 @@ next: goto loop; #ifdef INVARIANTS if (!vn_isdisk(vp, NULL)) - vprint("ffs_fsync: dirty", vp); + vn_printf(vp, "ffs_fsync: dirty "); #endif } BO_UNLOCK(bo); diff --git a/sys/ufs/ufs/ufs_lookup.c b/sys/ufs/ufs/ufs_lookup.c index 29d96a03ad64..dcff4fbe3d7a 100644 --- a/sys/ufs/ufs/ufs_lookup.c +++ b/sys/ufs/ufs/ufs_lookup.c @@ -1136,7 +1136,7 @@ ufs_direnter(dvp, tvp, dirp, cnp, newdirbp, isrename) error = UFS_TRUNCATE(dvp, (off_t)dp->i_endoff, IO_NORMAL | (DOINGASYNC(dvp) ? 0 : IO_SYNC), cr); if (error != 0) - vprint("ufs_direnter: failed to truncate", dvp); + vn_printf(dvp, "ufs_direnter: failed to truncate "); #ifdef UFS_DIRHASH if (error == 0 && dp->i_dirhash != NULL) ufsdirhash_dirtrunc(dp, dp->i_endoff); diff --git a/sys/ufs/ufs/ufs_quota.c b/sys/ufs/ufs/ufs_quota.c index 4fbb8a18032f..c236706f3346 100644 --- a/sys/ufs/ufs/ufs_quota.c +++ b/sys/ufs/ufs/ufs_quota.c @@ -469,7 +469,7 @@ chkdquot(struct inode *ip) continue; if (ip->i_dquot[i] == NODQUOT) { UFS_UNLOCK(ump); - vprint("chkdquot: missing dquot", ITOV(ip)); + vn_printf(ITOV(ip), "chkdquot: missing dquot "); panic("chkdquot: missing dquot"); } } diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index 297b1171423a..17723c7308f0 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -471,7 +471,7 @@ vm_object_vndeallocate(vm_object_t object) KASSERT(vp != NULL, ("vm_object_vndeallocate: missing vp")); #ifdef INVARIANTS if (object->ref_count == 0) { - vprint("vm_object_vndeallocate", vp); + vn_printf(vp, "vm_object_vndeallocate "); panic("vm_object_vndeallocate: bad object reference count"); } #endif