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 Add public namespace helper routine...
details: https://anonhg.NetBSD.org/src/rev/2b2302f002c3
branches: trunk
changeset: 755187:2b2302f002c3
user: pooka <pooka%NetBSD.org@localhost>
date: Wed May 26 21:50:56 2010 +0000
description:
Add public namespace helper routine for dumping info on mountpoints.
diffstat:
sys/rump/librump/rumpvfs/rump_vfs.c | 34 +++++++++++++++++++++++++++++++-
sys/rump/librump/rumpvfs/rumpvfs.ifspec | 4 ++-
2 files changed, 35 insertions(+), 3 deletions(-)
diffs (73 lines):
diff -r 1e89922c9bda -r 2b2302f002c3 sys/rump/librump/rumpvfs/rump_vfs.c
--- a/sys/rump/librump/rumpvfs/rump_vfs.c Wed May 26 21:48:20 2010 +0000
+++ b/sys/rump/librump/rumpvfs/rump_vfs.c Wed May 26 21:50:56 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rump_vfs.c,v 1.51 2010/05/20 15:46:47 pooka Exp $ */
+/* $NetBSD: rump_vfs.c,v 1.52 2010/05/26 21:50:56 pooka 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.51 2010/05/20 15:46:47 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rump_vfs.c,v 1.52 2010/05/26 21:50:56 pooka Exp $");
#include <sys/param.h>
#include <sys/buf.h>
@@ -430,6 +430,36 @@
printf("syncwait: unsynced buffers: %d\n", n);
}
+/*
+ * Dump info about mount point. No locking.
+ */
+void
+rump_vfs_mount_print(const char *path, int full)
+{
+#ifdef DEBUGPRINT
+ struct vnode *mvp;
+ struct vnode *vp;
+ int error;
+
+ rumpuser_dprintf("\n==== dumping mountpoint at ``%s'' ====\n\n", path);
+ if ((error = namei_simple_user(path, NSM_FOLLOW_NOEMULROOT, &mvp))!=0) {
+ rumpuser_dprintf("==== lookup error %d ====\n\n", error);
+ return;
+ }
+ 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);
+ }
+ }
+ vrele(mvp);
+ rumpuser_dprintf("\n==== done ====\n\n");
+#else
+ rumpuser_dprintf("mount dump not supported without DEBUGPRINT\n");
+#endif
+}
+
void
rump_biodone(void *arg, size_t count, int error)
{
diff -r 1e89922c9bda -r 2b2302f002c3 sys/rump/librump/rumpvfs/rumpvfs.ifspec
--- a/sys/rump/librump/rumpvfs/rumpvfs.ifspec Wed May 26 21:48:20 2010 +0000
+++ b/sys/rump/librump/rumpvfs/rumpvfs.ifspec Wed May 26 21:50:56 2010 +0000
@@ -1,4 +1,4 @@
-; $NetBSD: rumpvfs.ifspec,v 1.3 2010/05/20 15:46:47 pooka Exp $
+; $NetBSD: rumpvfs.ifspec,v 1.4 2010/05/26 21:50:56 pooka Exp $
NAME|vfs
PUBHDR|include/rump/rumpvfs_if_pub.h
@@ -51,6 +51,8 @@
void |vfs_syncwait |struct mount *
int |vfs_getmp |const char *, struct mount **
+void |vfs_mount_print|const char *, int
+
void |rcvp_set |struct vnode *, struct vnode *
struct vnode * |cdir_get |void
Home |
Main Index |
Thread Index |
Old Index