aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs/metaslab.c
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2015-02-09 16:53:42 -0800
committerBrian Behlendorf <[email protected]>2015-02-09 16:56:59 -0800
commitafe373260ebf96ca5482b9ccbcef5915c47d18f7 (patch)
tree9d7177f7fd9ce739623f67f47baf37755b996d78 /module/zfs/metaslab.c
parente890dd85a7522730ad46daf68150aafd3952d0c1 (diff)
Revert "Don't read space maps during import for readonly pools"
This reverts commit 7fc8c33ede10f7104ca0e91d690d3ebb5236887b which accidentally introduced a ztest failure. ztest: '/usr/sbin/zdb -bcc -d -U /var/tmp/zpool.cache ztest' exit code 2 child exited with code 3 Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'module/zfs/metaslab.c')
-rw-r--r--module/zfs/metaslab.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/module/zfs/metaslab.c b/module/zfs/metaslab.c
index 43d3b211e..f9eef272b 100644
--- a/module/zfs/metaslab.c
+++ b/module/zfs/metaslab.c
@@ -1255,10 +1255,9 @@ metaslab_init(metaslab_group_t *mg, uint64_t id, uint64_t object, uint64_t txg,
/*
* We only open space map objects that already exist. All others
- * will be opened when we finally allocate an object for it. For
- * readonly pools there is no need to open the space map object.
+ * will be opened when we finally allocate an object for it.
*/
- if (object != 0 && spa_writeable(vd->vdev_spa)) {
+ if (object != 0) {
error = space_map_open(&ms->ms_sm, mos, object, ms->ms_start,
ms->ms_size, vd->vdev_ashift, &ms->ms_lock);