summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/fs
diff options
context:
space:
mode:
authorEric Taylor <Eric.Taylor@Sun.COM>2009-11-11 11:29:27 -0700
committerEric Taylor <Eric.Taylor@Sun.COM>2009-11-11 11:29:27 -0700
commitb3388e4fc5f5c24c8a39fbe132a00b02dae5b717 (patch)
treeccb43789724da42d651489e0ef1c4e23a64511c7 /usr/src/uts/common/fs
parenta2de976fd11ced5331ebe7c3a8ffbaf11f5427cf (diff)
downloadillumos-joyent-b3388e4fc5f5c24c8a39fbe132a00b02dae5b717.tar.gz
6879915 spa_vdev_setpath can suspend holding spa_namespace_lock
6816106 ops on previously forced unmap of lofi with crypto enabled causes panic
Diffstat (limited to 'usr/src/uts/common/fs')
-rw-r--r--usr/src/uts/common/fs/zfs/spa.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/usr/src/uts/common/fs/zfs/spa.c b/usr/src/uts/common/fs/zfs/spa.c
index 069d2cafc7..29b7bacfc8 100644
--- a/usr/src/uts/common/fs/zfs/spa.c
+++ b/usr/src/uts/common/fs/zfs/spa.c
@@ -4062,23 +4062,21 @@ spa_vdev_resilver_done(spa_t *spa)
}
/*
- * Update the stored path or FRU for this vdev. Dirty the vdev configuration,
- * relying on spa_vdev_enter/exit() to synchronize the labels and cache.
+ * Update the stored path or FRU for this vdev.
*/
int
spa_vdev_set_common(spa_t *spa, uint64_t guid, const char *value,
boolean_t ispath)
{
vdev_t *vd;
- uint64_t txg;
- txg = spa_vdev_enter(spa);
+ spa_vdev_state_enter(spa, SCL_ALL);
if ((vd = spa_lookup_by_guid(spa, guid, B_TRUE)) == NULL)
- return (spa_vdev_exit(spa, NULL, txg, ENOENT));
+ return (spa_vdev_state_exit(spa, NULL, ENOENT));
if (!vd->vdev_ops->vdev_op_leaf)
- return (spa_vdev_exit(spa, NULL, txg, ENOTSUP));
+ return (spa_vdev_state_exit(spa, NULL, ENOTSUP));
if (ispath) {
spa_strfree(vd->vdev_path);
@@ -4089,9 +4087,7 @@ spa_vdev_set_common(spa_t *spa, uint64_t guid, const char *value,
vd->vdev_fru = spa_strdup(value);
}
- vdev_config_dirty(vd->vdev_top);
-
- return (spa_vdev_exit(spa, NULL, txg, 0));
+ return (spa_vdev_state_exit(spa, vd, 0));
}
int