Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Aug 2016 16:12:31 +0000 (UTC)
From:      Edward Tomasz Napierala <trasz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r303924 - in head/sys: fs/smbfs fs/unionfs kern sys ufs/ffs ufs/ufs vm
Message-ID:  <201608101612.u7AGCVXL034364@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: trasz
Date: Wed Aug 10 16:12:31 2016
New Revision: 303924
URL: https://svnweb.freebsd.org/changeset/base/303924

Log:
  Replace all remaining calls to vprint(9) with vn_printf(9), and remove
  the old macro.
  
  MFC after:	1 month

Modified:
  head/sys/fs/smbfs/smbfs_node.c
  head/sys/fs/unionfs/union_vnops.c
  head/sys/kern/vfs_default.c
  head/sys/kern/vfs_lookup.c
  head/sys/kern/vfs_mount.c
  head/sys/kern/vfs_subr.c
  head/sys/sys/vnode.h
  head/sys/ufs/ffs/ffs_snapshot.c
  head/sys/ufs/ffs/ffs_vnops.c
  head/sys/ufs/ufs/ufs_lookup.c
  head/sys/ufs/ufs/ufs_quota.c
  head/sys/vm/vm_object.c

Modified: head/sys/fs/smbfs/smbfs_node.c
==============================================================================
--- head/sys/fs/smbfs/smbfs_node.c	Wed Aug 10 15:45:25 2016	(r303923)
+++ head/sys/fs/smbfs/smbfs_node.c	Wed Aug 10 16:12:31 2016	(r303924)
@@ -132,7 +132,7 @@ smbfs_node_alloc(struct mount *mp, struc
 	}
 	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,

Modified: head/sys/fs/unionfs/union_vnops.c
==============================================================================
--- head/sys/fs/unionfs/union_vnops.c	Wed Aug 10 15:45:25 2016	(r303923)
+++ head/sys/fs/unionfs/union_vnops.c	Wed Aug 10 16:12:31 2016	(r303924)
@@ -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);
 }

Modified: head/sys/kern/vfs_default.c
==============================================================================
--- head/sys/kern/vfs_default.c	Wed Aug 10 15:45:25 2016	(r303923)
+++ head/sys/kern/vfs_default.c	Wed Aug 10 16:12:31 2016	(r303924)
@@ -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);
 }

Modified: head/sys/kern/vfs_lookup.c
==============================================================================
--- head/sys/kern/vfs_lookup.c	Wed Aug 10 15:45:25 2016	(r303923)
+++ head/sys/kern/vfs_lookup.c	Wed Aug 10 16:12:31 2016	(r303924)
@@ -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
 	 * 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"));

Modified: head/sys/kern/vfs_mount.c
==============================================================================
--- head/sys/kern/vfs_mount.c	Wed Aug 10 15:45:25 2016	(r303923)
+++ head/sys/kern/vfs_mount.c	Wed Aug 10 16:12:31 2016	(r303924)
@@ -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"));

Modified: head/sys/kern/vfs_subr.c
==============================================================================
--- head/sys/kern/vfs_subr.c	Wed Aug 10 15:45:25 2016	(r303923)
+++ head/sys/kern/vfs_subr.c	Wed Aug 10 16:12:31 2016	(r303924)
@@ -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, lockedvnode
 	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 ");
 		}
 	}
 }

Modified: head/sys/sys/vnode.h
==============================================================================
--- head/sys/sys/vnode.h	Wed Aug 10 15:45:25 2016	(r303923)
+++ head/sys/sys/vnode.h	Wed Aug 10 16:12:31 2016	(r303924)
@@ -655,7 +655,6 @@ int	vtruncbuf(struct vnode *vp, struct u
 	    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);

Modified: head/sys/ufs/ffs/ffs_snapshot.c
==============================================================================
--- head/sys/ufs/ffs/ffs_snapshot.c	Wed Aug 10 15:45:25 2016	(r303923)
+++ head/sys/ufs/ffs/ffs_snapshot.c	Wed Aug 10 16:12:31 2016	(r303924)
@@ -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);

Modified: head/sys/ufs/ffs/ffs_vnops.c
==============================================================================
--- head/sys/ufs/ffs/ffs_vnops.c	Wed Aug 10 15:45:25 2016	(r303923)
+++ head/sys/ufs/ffs/ffs_vnops.c	Wed Aug 10 16:12:31 2016	(r303924)
@@ -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);

Modified: head/sys/ufs/ufs/ufs_lookup.c
==============================================================================
--- head/sys/ufs/ufs/ufs_lookup.c	Wed Aug 10 15:45:25 2016	(r303923)
+++ head/sys/ufs/ufs/ufs_lookup.c	Wed Aug 10 16:12:31 2016	(r303924)
@@ -1136,7 +1136,7 @@ ufs_direnter(dvp, tvp, dirp, cnp, newdir
 		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);

Modified: head/sys/ufs/ufs/ufs_quota.c
==============================================================================
--- head/sys/ufs/ufs/ufs_quota.c	Wed Aug 10 15:45:25 2016	(r303923)
+++ head/sys/ufs/ufs/ufs_quota.c	Wed Aug 10 16:12:31 2016	(r303924)
@@ -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");
 		}
 	}

Modified: head/sys/vm/vm_object.c
==============================================================================
--- head/sys/vm/vm_object.c	Wed Aug 10 15:45:25 2016	(r303923)
+++ head/sys/vm/vm_object.c	Wed Aug 10 16:12:31 2016	(r303924)
@@ -471,7 +471,7 @@ vm_object_vndeallocate(vm_object_t objec
 	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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201608101612.u7AGCVXL034364>