After r292066, vdev_geom verifies both the vdev and pool guids of device labels
during open. However, spare and l2arc devices don't have pool guids, so
opening them by guid will fail (opening by path, when the pathname is known,
still succeeds). This change allows a vdev to be opened by guid if the label
contains no pool_guid, which is the case for inactive spares and l2arc devices.
Details
Details
- Reviewers
delphij - Commits
- rS293708: Fix importing l2arc device by guid
sys/cddl/zfs/tests/cli_root/zpool_import/zpool_import_test:zpool_import_missing_005_pos
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c | ||
---|---|---|
604 ↗ | (On Diff #12125) | Invert order to avoid the spa_guid call if pguid == 0? |
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c | ||
---|---|---|
604 ↗ | (On Diff #12125) | Alternatively, we could make spa_guid() call only once per vdev_geom_attach_by_guids because it's an invariant here? I think it's fine to land the change now and then address the optimization as a follow up change. |