Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/rump/librump/rumpvfs rump_vfs_mount_print: use vfs_vnode...
details: https://anonhg.NetBSD.org/src/rev/5d6f8abe5116
branches: trunk
changeset: 339426:5d6f8abe5116
user: hannken <hannken%NetBSD.org@localhost>
date: Wed Jul 22 08:36:05 2015 +0000
description:
rump_vfs_mount_print: use vfs_vnode_iterator to print attached vnodes.
diffstat:
sys/rump/librump/rumpvfs/rump_vfs.c | 21 +++++++++++++++------
1 files changed, 15 insertions(+), 6 deletions(-)
diffs (54 lines):
diff -r e5986bed6436 -r 5d6f8abe5116 sys/rump/librump/rumpvfs/rump_vfs.c
--- a/sys/rump/librump/rumpvfs/rump_vfs.c Wed Jul 22 08:35:26 2015 +0000
+++ b/sys/rump/librump/rumpvfs/rump_vfs.c Wed Jul 22 08:36:05 2015 +0000
@@ -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 @@
/*
* 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 @@
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");
Home |
Main Index |
Thread Index |
Old Index