mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-24 18:39:34 +03:00
Revert "Don't read space maps during import for readonly pools"
This reverts commit 7fc8c33ede
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 <behlendorf1@llnl.gov>
This commit is contained in:
parent
e890dd85a7
commit
afe373260e
@ -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);
|
||||
|
||||
|
@ -1906,12 +1906,6 @@ vdev_dtl_load(vdev_t *vd)
|
||||
if (vd->vdev_ops->vdev_op_leaf && vd->vdev_dtl_object != 0) {
|
||||
ASSERT(!vd->vdev_ishole);
|
||||
|
||||
/*
|
||||
* If the dtl cannot be sync'd there is no need to open it.
|
||||
*/
|
||||
if (!spa_writeable(spa))
|
||||
return (0);
|
||||
|
||||
error = space_map_open(&vd->vdev_dtl_sm, mos,
|
||||
vd->vdev_dtl_object, 0, -1ULL, 0, &vd->vdev_dtl_lock);
|
||||
if (error)
|
||||
|
Loading…
Reference in New Issue
Block a user