From ca8fe946b9198109d7b92c5278a6bd894ebec72c Mon Sep 17 00:00:00 2001 From: Rob Norris Date: Thu, 29 Feb 2024 15:46:00 +1100 Subject: [PATCH] zio: log ZIO and ABD flags for debug Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. --- module/zfs/zio.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/module/zfs/zio.c b/module/zfs/zio.c index bc5a3c9b70..9e5340a41c 100644 --- a/module/zfs/zio.c +++ b/module/zfs/zio.c @@ -52,6 +52,7 @@ #include #include #include +#include /* * ========================================================================== @@ -4608,6 +4609,18 @@ zio_ready(zio_t *zio) zio->io_bp_copy = *bp; #endif + if (zio->io_abd) { + char zioflagstr[256], abdflagstr[256]; + zfs_pretty_zio_flag_bits(zio->io_flags, + zioflagstr, sizeof (zioflagstr)); + zfs_pretty_abd_flag_bits(zio->io_abd->abd_flags, + abdflagstr, sizeof (abdflagstr)); + cmn_err(CE_NOTE, "zio_ready: zio %p type %d flags [%s];" + " abd %p size %08x flags [%s]", + zio, zio->io_type, zioflagstr, + zio->io_abd, zio->io_abd->abd_size, abdflagstr); + } + if (zio->io_error != 0) { zio->io_pipeline = ZIO_INTERLOCK_PIPELINE;