diff options
author | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2009-08-14 21:16:14 +0000 |
---|---|---|
committer | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2009-08-14 21:16:14 +0000 |
commit | f8b1f34773266b2eb78bfde67f54046befc4a5c2 (patch) | |
tree | 6c9b413b711443d586b2280e619ac44a1160bf83 /sys/ddb | |
parent | 31321762e2f18a8b0185b04f003f256a65fa9ecc (diff) |
add ddb functions to be able to show all the nfsnodes in the system
and rewrite the nfsreq code to use pool_walk().
OK beck@, blambert@
Diffstat (limited to 'sys/ddb')
-rw-r--r-- | sys/ddb/db_command.c | 24 | ||||
-rw-r--r-- | sys/ddb/db_command.h | 3 | ||||
-rw-r--r-- | sys/ddb/db_interface.h | 7 |
3 files changed, 26 insertions, 8 deletions
diff --git a/sys/ddb/db_command.c b/sys/ddb/db_command.c index 93160167b8b..1115a45d70b 100644 --- a/sys/ddb/db_command.c +++ b/sys/ddb/db_command.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_command.c,v 1.58 2009/08/13 15:42:03 thib Exp $ */ +/* $OpenBSD: db_command.c,v 1.59 2009/08/14 21:16:13 thib Exp $ */ /* $NetBSD: db_command.c,v 1.20 1996/03/30 22:30:05 christos Exp $ */ /* @@ -398,14 +398,28 @@ db_vnode_print_cmd(db_expr_t addr, int have_addr, db_expr_t count, char *modif) #ifdef NFSCLIENT /*ARGSUSED*/ void -db_nfsreq_print_cmd(db_expr_t addr, int have_addr, db_expr_t count, char *modif) +db_nfsreq_print_cmd(db_expr_t addr, int have_addr, db_expr_t count, + char *modif) +{ + boolean_t full = FALSE; + + if (modif[0] == 'f') + full = TRUE; + + nfs_request_print((void *)addr, full, db_printf); +} + +/*ARGSUSED*/ +void +db_nfsnode_print_cmd(db_expr_t addr, int have_addr, db_expr_t count, + char *modif) { boolean_t full = FALSE; if (modif[0] == 'f') full = TRUE; - db_nfsreq_print((struct nfsreq *) addr, full, db_printf); + nfs_node_print((void *)addr, full, db_printf); } #endif @@ -471,7 +485,8 @@ struct db_command db_show_all_cmds[] = { { "mounts", db_show_all_mounts, 0, NULL }, { "vnodes", db_show_all_vnodes, 0, NULL }, #ifdef NFSCLIENT - { "nfsreq", db_show_all_nfsreqs, 0, NULL }, + { "nfsreqs", db_show_all_nfsreqs, 0, NULL }, + { "nfsnodes", db_show_all_nfsnodes, 0, NULL }, #endif { NULL, NULL, 0, NULL } }; @@ -487,6 +502,7 @@ struct db_command db_show_cmds[] = { { "mount", db_mount_print_cmd, 0, NULL }, #ifdef NFSCLIENT { "nfsreq", db_nfsreq_print_cmd, 0, NULL }, + { "nfsnode", db_nfsnode_print_cmd, 0, NULL }, #endif { "object", db_object_print_cmd, 0, NULL }, #ifdef DDB_STRUCT_INFORMATION diff --git a/sys/ddb/db_command.h b/sys/ddb/db_command.h index b306d206428..13ef6ccaab1 100644 --- a/sys/ddb/db_command.h +++ b/sys/ddb/db_command.h @@ -1,4 +1,4 @@ -/* $OpenBSD: db_command.h,v 1.27 2009/08/13 13:49:20 thib Exp $ */ +/* $OpenBSD: db_command.h,v 1.28 2009/08/14 21:16:13 thib Exp $ */ /* $NetBSD: db_command.h,v 1.8 1996/02/05 01:56:55 christos Exp $ */ /* @@ -52,6 +52,7 @@ void db_proc_print_cmd(db_expr_t, int, db_expr_t, char *); void db_uvmexp_print_cmd(db_expr_t, int, db_expr_t, char *); void db_vnode_print_cmd(db_expr_t, int, db_expr_t, char *); void db_nfsreq_print_cmd(db_expr_t, int, db_expr_t, char *); +void db_nfsnode_print_cmd(db_expr_t, int, db_expr_t, char *); void db_machine_commands_install(struct db_command *); void db_help_cmd(db_expr_t, int, db_expr_t, char *); void db_command_loop(void); diff --git a/sys/ddb/db_interface.h b/sys/ddb/db_interface.h index 5d57ed043d9..7b25667d3c6 100644 --- a/sys/ddb/db_interface.h +++ b/sys/ddb/db_interface.h @@ -1,4 +1,4 @@ -/* $OpenBSD: db_interface.h,v 1.13 2009/08/13 13:49:20 thib Exp $ */ +/* $OpenBSD: db_interface.h,v 1.14 2009/08/14 21:16:13 thib Exp $ */ /* $NetBSD: db_interface.h,v 1.1 1996/02/05 01:57:03 christos Exp $ */ /* @@ -56,9 +56,10 @@ void vfs_mount_print(struct mount *, int, int (*)(const char *, ...)); void db_show_all_pools(db_expr_t, int, db_expr_t, char *); /* nfs/nfs_debug.c */ -struct nfsreq; void db_show_all_nfsreqs(db_expr_t, int, db_expr_t, char *); -void db_nfsreq_print(struct nfsreq *, int, int (*)(const char *, ...)); +void nfs_request_print(void *, int, int (*)(const char *, ...)); +void db_show_all_nfsnodes(db_expr_t, int, db_expr_t, char *); +void nfs_node_print(void *, int, int (*)(const char *, ...)); /* ufs/ffs/ffs_softdep.c */ struct worklist; |