From 4b1a11443659e50cf4dd8cb4be481621cde3db2c Mon Sep 17 00:00:00 2001 From: phk Date: Fri, 3 Dec 2004 12:09:34 +0000 Subject: [PATCH] Improve vprint() a little bit: break long lines, reduce indent and tell if the VI_LOCK() is held. --- sys/kern/vfs_subr.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 4ae483c30b38..e083aa768753 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -2651,9 +2651,9 @@ vprint(label, vp) printf("%s: %p: ", label, (void *)vp); else printf("%p: ", (void *)vp); - printf("tag %s, type %s, usecount %d, writecount %d, refcount %d,", - vp->v_tag, typename[vp->v_type], vp->v_usecount, - vp->v_writecount, vp->v_holdcnt); + printf("tag %s, type %s\n ", vp->v_tag, typename[vp->v_type]); + printf("usecount %d, writecount %d, refcount %d mountedhere %p\n", + vp->v_usecount, vp->v_writecount, vp->v_holdcnt, vp->v_mountedhere); buf[0] = '\0'; if (vp->v_vflag & VV_ROOT) strcat(buf, "|VV_ROOT"); @@ -2672,7 +2672,10 @@ vprint(label, vp) if (vp->v_vflag & VV_OBJBUF) strcat(buf, "|VV_OBJBUF"); if (buf[0] != '\0') - printf(" flags (%s),", &buf[1]); + printf(" flags (%s)", &buf[1]); + if (mtx_owned(VI_MTX(vp))) + printf(" VI_LOCKed"); + printf("\n "); lockmgr_printinfo(vp->v_vnlock); printf("\n"); if (vp->v_data != NULL)