Skip to content
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

zio: do no-op injections just before handing off to vdevs #17029

Merged
merged 1 commit into from
Feb 8, 2025

Conversation

robn
Copy link
Member

@robn robn commented Feb 5, 2025

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

Motivation and Context

"no-op" injections (#16085) simply make the op succeed, entirely bypassing the vdev stages, including queuing and error assessment. This makes it useless for testing those things in conjunction with its original purpose: simulating a failure between a device cache and its permanent store.

Description

Move the injection down, making it the last thing to happen after the IO is dequeued and the device health is checked. Then, don't bypass the vdev stages anymore; instead, let it proceed to VDEV_IO_DONE where it can be properly counted and disaggregated by the queue and any followup processing can occur.

How Has This Been Tested?

Mostly internal testing with some new queue functionality. We have no specific tests for no-op in the test suite, though I've run the zinject suite to success as some sort of sanity.

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)
  • 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:

module/zfs/zio.c Outdated Show resolved Hide resolved
@amotin amotin added the Status: Code Review Needed Ready for review and testing label Feb 6, 2025
The purpose of no-op is to simulate a failure between a device cache and
its permanent store. We still want it to go through the queue and
respond in the same way to everything else.

So, inject "success" as the very last thing, and then move on to
VDEV_IO_DONE to be dequeued and so any followup work can occur.

Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Signed-off-by: Rob Norris <[email protected]>
@robn robn force-pushed the inject-noop-late branch from 5e3184a to b31bdbd Compare February 7, 2025 04:42
@amotin amotin added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Feb 7, 2025
@amotin amotin merged commit b8c73ab into openzfs:master Feb 8, 2025
23 of 25 checks passed
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