diff options
author | Matthew Macy <[email protected]> | 2020-11-17 09:50:52 -0800 |
---|---|---|
committer | GitHub <[email protected]> | 2020-11-17 09:50:52 -0800 |
commit | 0ca45cb31092358044d11f6085b6338fb5fca602 (patch) | |
tree | 684a3263fd0caf6dda1450b46b21193b7f517765 /include/sys/zvol_impl.h | |
parent | 82611cdfe586a1da5e48cfdc6864b94470281e6e (diff) |
Fix problems in zvol_set_volmode_impl
- Don't leave fstrans set when passed a snapshot
- Don't remove minor if volmode already matches new value
- (FreeBSD) Wait for GEOM ops to complete before trying
remove (at create time GEOM will be "tasting" in parallel)
- (FreeBSD) Don't leak zvol_state_lock on open if zv == NULL
- (FreeBSD) Don't try to unlock zv->zv_state lock if zv == NULL
Reviewed-by: Ryan Moeller <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Matt Macy <[email protected]>
Closes #11199
Diffstat (limited to 'include/sys/zvol_impl.h')
-rw-r--r-- | include/sys/zvol_impl.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/sys/zvol_impl.h b/include/sys/zvol_impl.h index 36199c311..5137d2172 100644 --- a/include/sys/zvol_impl.h +++ b/include/sys/zvol_impl.h @@ -46,6 +46,7 @@ typedef struct zvol_state { uint32_t zv_flags; /* ZVOL_* flags */ uint32_t zv_open_count; /* open counts */ uint32_t zv_changed; /* disk changed */ + uint32_t zv_volmode; /* volmode */ zilog_t *zv_zilog; /* ZIL handle */ zfs_rangelock_t zv_rangelock; /* for range locking */ dnode_t *zv_dn; /* dnode hold */ @@ -88,6 +89,7 @@ int zvol_get_data(void *arg, lr_write_t *lr, char *buf, struct lwb *lwb, zio_t *zio); int zvol_init_impl(void); void zvol_fini_impl(void); +void zvol_wait_close(zvol_state_t *zv); /* * platform dependent functions exported to platform independent code |