mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2025-01-29 03:14:25 +03:00
Fixup "Avoid the GEOM topology lock recursion when autoexpanding a pool"
The patch was applied to vdev_geom_open instead of vdev_geom_close by mistake. Reviewed-by: Alexander Motin <mav@FreeBSD.org> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ryan Moeller <ryan@iXsystems.com> Closes #10427
This commit is contained in:
parent
66786f7943
commit
feff3f69fc
@ -804,7 +804,7 @@ vdev_geom_open(vdev_t *vd, uint64_t *psize, uint64_t *max_psize,
|
|||||||
{
|
{
|
||||||
struct g_provider *pp;
|
struct g_provider *pp;
|
||||||
struct g_consumer *cp;
|
struct g_consumer *cp;
|
||||||
int error, has_trim, locked;
|
int error, has_trim;
|
||||||
uint16_t rate;
|
uint16_t rate;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -831,9 +831,7 @@ vdev_geom_open(vdev_t *vd, uint64_t *psize, uint64_t *max_psize,
|
|||||||
}
|
}
|
||||||
|
|
||||||
DROP_GIANT();
|
DROP_GIANT();
|
||||||
locked = g_topology_locked();
|
g_topology_lock();
|
||||||
if (!locked)
|
|
||||||
g_topology_lock();
|
|
||||||
error = 0;
|
error = 0;
|
||||||
|
|
||||||
if (vd->vdev_spa->spa_is_splitting ||
|
if (vd->vdev_spa->spa_is_splitting ||
|
||||||
@ -928,8 +926,7 @@ vdev_geom_open(vdev_t *vd, uint64_t *psize, uint64_t *max_psize,
|
|||||||
vdev_geom_set_physpath(vd, cp, /* do_null_update */B_FALSE);
|
vdev_geom_set_physpath(vd, cp, /* do_null_update */B_FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!locked)
|
g_topology_unlock();
|
||||||
g_topology_unlock();
|
|
||||||
PICKUP_GIANT();
|
PICKUP_GIANT();
|
||||||
if (cp == NULL) {
|
if (cp == NULL) {
|
||||||
vd->vdev_stat.vs_aux = VDEV_AUX_OPEN_FAILED;
|
vd->vdev_stat.vs_aux = VDEV_AUX_OPEN_FAILED;
|
||||||
@ -983,18 +980,22 @@ static void
|
|||||||
vdev_geom_close(vdev_t *vd)
|
vdev_geom_close(vdev_t *vd)
|
||||||
{
|
{
|
||||||
struct g_consumer *cp;
|
struct g_consumer *cp;
|
||||||
|
boolean_t locked;
|
||||||
|
|
||||||
cp = vd->vdev_tsd;
|
cp = vd->vdev_tsd;
|
||||||
|
|
||||||
DROP_GIANT();
|
DROP_GIANT();
|
||||||
g_topology_lock();
|
locked = g_topology_locked();
|
||||||
|
if (!locked)
|
||||||
|
g_topology_lock();
|
||||||
|
|
||||||
if (!vd->vdev_reopening ||
|
if (!vd->vdev_reopening ||
|
||||||
(cp != NULL && ((cp->flags & G_CF_ORPHAN) != 0 ||
|
(cp != NULL && ((cp->flags & G_CF_ORPHAN) != 0 ||
|
||||||
(cp->provider != NULL && cp->provider->error != 0))))
|
(cp->provider != NULL && cp->provider->error != 0))))
|
||||||
vdev_geom_close_locked(vd);
|
vdev_geom_close_locked(vd);
|
||||||
|
|
||||||
g_topology_unlock();
|
if (!locked)
|
||||||
|
g_topology_unlock();
|
||||||
PICKUP_GIANT();
|
PICKUP_GIANT();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user