Skip to content

events: include zio type in IO error reports #17381

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

robn
Copy link
Member

@robn robn commented May 27, 2025

[Sponsors: Klara, Inc., Wasabi Technology, Inc.]

Motivation and Context

I am making more and varied IO shapes that fail aggressively. This patch is helping me!

Description

Adds io_type to error reports.

Usually the IO type can be inferred from the other fields (in particular, priority and flags) sometimes it's not easy to see. This is just another little debug helper.

    May 27 2025 00:54:54.024110493 ereport.fs.zfs.data
            class = "ereport.fs.zfs.data"
            ena = 0x1f5ecfae600801
            ...
            zio_delta = 0x0
            zio_type = 0x2 [WRITE]
            zio_priority = 0x3 [ASYNC_WRITE]
            zio_objset = 0x0

I added descriptions of zio_type and zio_priority to zpool-events.8 as well (the latter because I thought I missed it in an earlier commit, only to find it had nothing to do with me, oh well).

How Has This Been Tested?

Used in anger on Linux for a while. Compile checked on FreeBSD just now. events test tag passed, though nothing in ZTS actually considers the event output in any depth, so that's not surprising.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Quality assurance (non-breaking change which makes the code more robust against bugs)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist:

@robn robn force-pushed the events-io-type branch from 8c20d4e to fa6e8e6 Compare May 27, 2025 01:50
@amotin amotin added the Status: Code Review Needed Ready for review and testing label May 27, 2025
@amotin
Copy link
Member

amotin commented May 28, 2025

@robn Conflict has appeared here.

Copy link
Contributor

@behlendorf behlendorf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good after resolving the conflict.

@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels May 28, 2025
robn added 2 commits May 29, 2025 07:51
Usually the IO type can be inferred from the other fields (in
particular, priority and flags) sometimes it's not easy to see. This is
just another little debug helper.

    May 27 2025 00:54:54.024110493 ereport.fs.zfs.data
            class = "ereport.fs.zfs.data"
            ena = 0x1f5ecfae600801
            ...
            zio_delta = 0x0
            zio_type = 0x2 [WRITE]
            zio_priority = 0x3 [ASYNC_WRITE]
            zio_objset = 0x0

Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Signed-off-by: Rob Norris <[email protected]>
Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Signed-off-by: Rob Norris <[email protected]>
@robn robn force-pushed the events-io-type branch from fa6e8e6 to 56b2669 Compare May 28, 2025 21:51
@github-actions github-actions bot removed the Status: Accepted Ready to integrate (reviewed, tested) label May 28, 2025
@amotin amotin added the Status: Accepted Ready to integrate (reviewed, tested) label May 28, 2025
@robn
Copy link
Member Author

robn commented May 29, 2025

Weird, the conflict was in the ABI dump, so I pushed without that change to get a new one generated, and it succeeded? Not sure I expected that, but I will trust the system and shrug and move on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants