Skip to content

Commit

Permalink
zio: log ZIO and ABD flags for debug
Browse files Browse the repository at this point in the history
Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
  • Loading branch information
robn committed Jul 26, 2024
1 parent 152a731 commit ca8fe94
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions module/zfs/zio.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
#include <sys/abd.h>
#include <sys/dsl_crypt.h>
#include <cityhash.h>
#include <zfs_pretty.h>

/*
* ==========================================================================
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit ca8fe94

Please sign in to comment.