From 40c83b7b3a2a5041e30d0bdaca5a164531ba5ba0 Mon Sep 17 00:00:00 2001 From: Rob Norris Date: Thu, 29 Feb 2024 15:00:25 +1100 Subject: [PATCH] zpool events: describe zio_flags in verbose output Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. --- cmd/zpool/zpool_main.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/cmd/zpool/zpool_main.c b/cmd/zpool/zpool_main.c index 57170c8ae7..04c0cea5d7 100644 --- a/cmd/zpool/zpool_main.c +++ b/cmd/zpool/zpool_main.c @@ -75,6 +75,7 @@ #include "zpool_util.h" #include "zfs_comutil.h" #include "zfeature_common.h" +#include "zfs_pretty.h" #include "statcommon.h" @@ -10338,7 +10339,15 @@ zpool_do_events_nvprint(nvlist_t *nvl, int depth) case DATA_TYPE_INT32: (void) nvpair_value_int32(nvp, (void *)&i32); - printf(gettext("0x%x"), i32); + if (strcmp(name, + FM_EREPORT_PAYLOAD_ZFS_ZIO_FLAGS) == 0) { + static char flagstr[512]; + zfs_pretty_zio_flag_str(i32, flagstr, + sizeof (flagstr)); + printf(gettext("0x%x [%s]"), i32, flagstr); + } else { + printf(gettext("0x%x"), i32); + } break; case DATA_TYPE_UINT32: