mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-25 19:57:43 +03:00
zvol: reject suspend attempts when zvol is shutting down
Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Rob Norris <rob.norris@klarasystems.com> Closes #17690
This commit is contained in:
committed by
Brian Behlendorf
parent
24baccb75e
commit
56e8ab4a3e
@@ -4726,7 +4726,7 @@ zfs_ioc_rollback(const char *fsname, nvlist_t *innvl, nvlist_t *outnvl)
|
||||
error = error ? error : resume_err;
|
||||
}
|
||||
zfs_vfs_rele(zfsvfs);
|
||||
} else if ((zv = zvol_suspend(fsname)) != NULL) {
|
||||
} else if (zvol_suspend(fsname, &zv) == 0) {
|
||||
error = dsl_dataset_rollback(fsname, target, zvol_tag(zv),
|
||||
outnvl);
|
||||
zvol_resume(zv);
|
||||
@@ -5448,7 +5448,7 @@ zfs_ioc_recv_impl(char *tofs, char *tosnap, const char *origin,
|
||||
}
|
||||
error = error ? error : end_err;
|
||||
zfs_vfs_rele(zfsvfs);
|
||||
} else if ((zv = zvol_suspend(tofs)) != NULL) {
|
||||
} else if (zvol_suspend(tofs, &zv) == 0) {
|
||||
error = dmu_recv_end(&drc, zvol_tag(zv));
|
||||
zvol_resume(zv);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user