zfs icon indicating copy to clipboard operation
zfs copied to clipboard

zio_resume: log when unsuspending the pool

Open robn opened this issue 1 year ago • 0 comments

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

Motivation and Context

Sometimes we get logs from customers and its easy to see when the pool suspended, and much harder to figure out when they resumed it.

Description

When the pool is resumed, spit some output in the style of the suspend log.

Because zio_resume() is called any time zpool clear is run, only logs on transition from suspended to not-suspended.

How Has This Been Tested?

Just a dumb suspend & resume on the test rig:

[    7.952215] WARNING: Pool 'tank' has encountered an uncorrectable I/O failure and has been suspended.

# zpool clear tank
[   17.626131] WARNING: Pool 'tank' was suspended and is being resumed. Failed I/O will be retried.

I have a ZTS run in progress, but I'm not expecting anything in it to care.

Types of changes

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [x] 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:

  • [x] My code follows the OpenZFS code style requirements.
  • [ ] I have updated the documentation accordingly.
  • [x] I have read the contributing document.
  • [ ] I have added tests to cover my changes.
  • [x] I have run the ZFS Test Suite with this change applied.
  • [x] All commit messages are properly formatted and contain Signed-off-by.

robn avatar Aug 28 '24 07:08 robn