HomeFreeBSD

Add log_must_{retry,busy} helpers

Description

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

Details

Provenance
Brian Behlendorf <behlendorf1@llnl.gov>Authored on Jun 20 2016, 9:28 PM
Parents
rG2158b165ed02: Update zfs_mount_005_pos.ksh and zfs_mount_010_neg.ksh
Branches
Unknown
Tags
Unknown