]> granicus.if.org Git - zfs/commit
Add log_must_{retry,busy} helpers
authorBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 20 Jun 2016 21:28:51 +0000 (14:28 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 30 Aug 2016 22:26:14 +0000 (15:26 -0700)
commite623aea2ec11b4e3da8ddec50634be6e0be14eaf
tree3f59aa864827437237ed808a653436c8424bc2d5
parent2158b165ed02178a58540b55eca828d32977147c
Add log_must_{retry,busy} helpers

Add helpers which automatically retry the provided command when
the error message matches the provided keyword.  This provides an
easy way to handle the asynchronous nature of some ZFS commands.

For example, the `zfs destroy` command may need to be retried in
the case where the block device is unexpected busy.  This can be
accomplished as follows:

  log_must_busy $ZFS destroy ...

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #5002
tests/test-runner/include/logapi.shlib