diff options
author | George Melikov <[email protected]> | 2017-01-28 23:16:43 +0300 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2017-01-28 12:16:43 -0800 |
commit | fa603f823331a948038dd8e56113df36d7293932 (patch) | |
tree | 4bfb1a11005c1b22333a46467ee53c2595227d30 /module | |
parent | a32494d22ac25c35c5d26eb0b2607ea68adb93cd (diff) |
OpenZFS 7277 - zdb should be able to print zfs_dbgmsg's
Porting notes:
- 'zfs_dbgmsg_print()' reintroduced to userspace.
Authored by: Pavel Zakharov <[email protected]>
Reviewed by: George Wilson <[email protected]>
Reviewed by: Matthew Ahrens <[email protected]>
Reviewed by: Igor Kozhukhov <[email protected]>
Approved by: Dan McDonald <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Giuseppe Di Natale <[email protected]>
Ported-by: George Melikov <[email protected]>
OpenZFS-issue: https://www.illumos.org/issues/7277
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/29bdd2f
Closes #5684
Diffstat (limited to 'module')
-rw-r--r-- | module/zfs/zfs_debug.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/module/zfs/zfs_debug.c b/module/zfs/zfs_debug.c index b553d21e4..76a3ad91c 100644 --- a/module/zfs/zfs_debug.c +++ b/module/zfs/zfs_debug.c @@ -228,6 +228,21 @@ __dprintf(const char *file, const char *func, int line, const char *fmt, ...) kmem_free(buf, size); } + +#else + +void +zfs_dbgmsg_print(const char *tag) +{ + zfs_dbgmsg_t *zdm; + + (void) printf("ZFS_DBGMSG(%s):\n", tag); + mutex_enter(&zfs_dbgmsgs_lock); + for (zdm = list_head(&zfs_dbgmsgs); zdm; + zdm = list_next(&zfs_dbgmsgs, zdm)) + (void) printf("%s\n", zdm->zdm_msg); + mutex_exit(&zfs_dbgmsgs_lock); +} #endif /* _KERNEL */ #ifdef _KERNEL |