diff options
author | Boris Protopopov <[email protected]> | 2016-02-16 14:52:55 -0500 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2016-02-24 11:54:24 -0800 |
commit | 5428dc51fb55145fbac1c142402dafc11d1e7d28 (patch) | |
tree | 10a844b20c4c7173222d85f0cb974541dcea531e /contrib/initramfs | |
parent | 19a47cb1c2be6da9b9d4a395a7afc07da4813a5f (diff) |
Make zvol minor functionality more robust
Close the race window in zvol_open() to prevent removal of
zvol_state in the 'first open' code path. Move the call to
check_disk_change() under zvol_state_lock to make sure the
zvol_media_changed() and zvol_revalidate_disk() called by
check_disk_change() are invoked with positive zv_open_count.
Skip opened zvols when removing minors and set private_data
to NULL for zvols that are not in use whose minors are being
removed, to indicate to zvol_open() that the state is gone.
Skip opened zvols when renaming minors to avoid modifying
zv_name that might be in use, e.g. in zvol_ioctl().
Drop zvol_state_lock before calling add_disk() when creating
minors to avoid deadlocks with zvol_open().
Wrap dmu_objset_find() with spl_fstran_mark()/unmark().
Signed-off-by: Boris Protopopov <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Signed-off-by: Richard Yao <[email protected]>
Closes #4344
Diffstat (limited to 'contrib/initramfs')
0 files changed, 0 insertions, 0 deletions