mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
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 <ryan@iXsystems.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Matt Macy <mmacy@FreeBSD.org> Closes #11199
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user