zfs/module
Chunwei Chen 040dab9939 Suspend/resume zvol for recv and rollback
When doing recv and rollback, dsl_dataset_clone_swap_sync_impl will be
called to swap out the ds_objset and do dmu_objset_evict on the old one.
However, currently zv->zv_objset will not be swapped out accordingly, so
if anyone currently holds a fd on the zvol, we risk hitting a use-after-free.

We fix this by introducing the suspend and resume mechanism of zsb to
zv.  Before recv or rollback, we use zvol_suspend to block all access to
zv_objset and shut it down. After the recv or rollback, we use zvol_resume
to swap in zv_objset with the new ds_objset and unblock the access.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Closes #4866 
Closes #5609
2017-01-19 13:56:36 -08:00
..
avl Fix uninitialized variable in avl_add() 2016-07-25 14:21:34 -07:00
icp Fix spelling 2017-01-03 11:31:18 -06:00
nvpair Fix spelling 2017-01-03 11:31:18 -06:00
unicode Fix spelling 2017-01-03 11:31:18 -06:00
zcommon Fix spelling 2017-01-03 11:31:18 -06:00
zfs Suspend/resume zvol for recv and rollback 2017-01-19 13:56:36 -08:00
zpios Fix spelling 2017-01-03 11:31:18 -06:00
.gitignore module/.gitignore: Add *.dwo (#4580) 2016-05-02 09:07:04 -07:00
Makefile.in module/Makefile.in: use relative cp 2017-01-13 15:18:34 -08:00