diff options
Diffstat (limited to 'module/zfs/zfs_ioctl.c')
-rw-r--r-- | module/zfs/zfs_ioctl.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/module/zfs/zfs_ioctl.c b/module/zfs/zfs_ioctl.c index ba4e0ee3f..659345917 100644 --- a/module/zfs/zfs_ioctl.c +++ b/module/zfs/zfs_ioctl.c @@ -3641,6 +3641,7 @@ static int zfs_ioc_rollback(const char *fsname, nvlist_t *args, nvlist_t *outnvl) { zfs_sb_t *zsb; + zvol_state_t *zv; int error; if (get_zfs_sb(fsname, &zsb) == 0) { @@ -3653,6 +3654,9 @@ zfs_ioc_rollback(const char *fsname, nvlist_t *args, nvlist_t *outnvl) error = error ? error : resume_err; } deactivate_super(zsb->z_sb); + } else if ((zv = zvol_suspend(fsname)) != NULL) { + error = dsl_dataset_rollback(fsname, zvol_tag(zv), outnvl); + zvol_resume(zv); } else { error = dsl_dataset_rollback(fsname, NULL, outnvl); } @@ -4240,6 +4244,7 @@ zfs_ioc_recv_impl(char *tofs, char *tosnap, char *origin, if (error == 0) { zfs_sb_t *zsb = NULL; + zvol_state_t *zv = NULL; if (get_zfs_sb(tofs, &zsb) == 0) { /* online recv */ @@ -4255,6 +4260,9 @@ zfs_ioc_recv_impl(char *tofs, char *tosnap, char *origin, error = zfs_resume_fs(zsb, tofs); error = error ? error : end_err; deactivate_super(zsb->z_sb); + } else if ((zv = zvol_suspend(tofs)) != NULL) { + error = dmu_recv_end(&drc, zvol_tag(zv)); + zvol_resume(zv); } else { error = dmu_recv_end(&drc, NULL); } |