Module Name:    src
Committed By:   hannken
Date:           Wed Jul 22 08:36:05 UTC 2015

Modified Files:
        src/sys/rump/librump/rumpvfs: rump_vfs.c

Log Message:
rump_vfs_mount_print: use vfs_vnode_iterator to print attached vnodes.


To generate a diff of this commit:
cvs rdiff -u -r1.82 -r1.83 src/sys/rump/librump/rumpvfs/rump_vfs.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/librump/rumpvfs/rump_vfs.c
diff -u src/sys/rump/librump/rumpvfs/rump_vfs.c:1.82 src/sys/rump/librump/rumpvfs/rump_vfs.c:1.83
--- src/sys/rump/librump/rumpvfs/rump_vfs.c:1.82	Wed May  6 15:57:08 2015
+++ src/sys/rump/librump/rumpvfs/rump_vfs.c	Wed Jul 22 08:36:05 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump_vfs.c,v 1.82 2015/05/06 15:57:08 hannken Exp $	*/
+/*	$NetBSD: rump_vfs.c,v 1.83 2015/07/22 08:36:05 hannken Exp $	*/
 
 /*
  * Copyright (c) 2008 Antti Kantee.  All Rights Reserved.
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rump_vfs.c,v 1.82 2015/05/06 15:57:08 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rump_vfs.c,v 1.83 2015/07/22 08:36:05 hannken Exp $");
 
 #include <sys/param.h>
 #include <sys/buf.h>
@@ -468,12 +468,21 @@ rump_vfs_syncwait(struct mount *mp)
 /*
  * Dump info about mount point.  No locking.
  */
+static bool
+rump_print_selector(void *cl, struct vnode *vp)
+{
+	int *full = cl;
+
+	vfs_vnode_print(vp, *full, (void *)rumpuser_dprintf);
+	return false;
+}
+
 void
 rump_vfs_mount_print(const char *path, int full)
 {
 #ifdef DEBUGPRINT
 	struct vnode *mvp;
-	struct vnode *vp;
+	struct vnode_iterator *marker;
 	int error;
 
 	rumpuser_dprintf("\n==== dumping mountpoint at ``%s'' ====\n\n", path);
@@ -484,9 +493,9 @@ rump_vfs_mount_print(const char *path, i
 	vfs_mount_print(mvp->v_mount, full, (void *)rumpuser_dprintf);
 	if (full) {
 		rumpuser_dprintf("\n== dumping vnodes ==\n\n");
-		TAILQ_FOREACH(vp, &mvp->v_mount->mnt_vnodelist, v_mntvnodes) {
-			vfs_vnode_print(vp, full, (void *)rumpuser_dprintf);
-		}
+		vfs_vnode_iterator_init(mvp->v_mount, &marker);
+		vfs_vnode_iterator_next(marker, rump_print_selector, &full);
+		vfs_vnode_iterator_destroy(marker);
 	}
 	vrele(mvp);
 	rumpuser_dprintf("\n==== done ====\n\n");

Reply via email to