libzfs should gracefully handle EINVAL from lzc_rollback
EINVAL is returned when a dataset does not have any snapshots, so there is nothing to roll back to.
Although the code in
zfs_do_rollback checks for that condition in advance, it's still possible that the snapshot(s) gets removed after the check and before the rollback sync task is executed.
At the moment
zfs command would crash when that happens.
Updated by Electric Monk over 1 year ago
- Status changed from New to Closed
- % Done changed from 0 to 100
commit 95643f75d23914a3e332adc9661ed51749e9858d Author: Andriy Gapon <avg@FreeBSD.org> Date: 2018-02-08T05:16:38.000Z 8520 lzc_rollback_to should support rolling back to origin 7198 libzfs should gracefully handle EINVAL from lzc_rollback Reviewed by: Matthew Ahrens <firstname.lastname@example.org> Approved by: Dan McDonald <email@example.com>