mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
Store the L2ARC device ashift in the vdev label
If this is not done, and the pool has an ashift other than the default (at the moment 9) then the following happens: 1) vdev_alloc() assigns the ashift of the pool to L2ARC device, but upon export it is not stored anywhere 2) at the first import, vdev_open() sees an vdev_ashift() of 0 and assigns the logical_ashift, which is 9 3) reading the contents of L2ARC, including the header fails 4) L2ARC buffers are not restored in ARC. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: George Amanakis <gamanakis@gmail.com> Closes #14313 Closes #14963
This commit is contained in:
committed by
Brian Behlendorf
parent
c12b5829e1
commit
f28cd347c4
@@ -468,6 +468,9 @@ vdev_config_generate(spa_t *spa, vdev_t *vd, boolean_t getstats,
|
||||
if (vd->vdev_isspare)
|
||||
fnvlist_add_uint64(nv, ZPOOL_CONFIG_IS_SPARE, 1);
|
||||
|
||||
if (flags & VDEV_CONFIG_L2CACHE)
|
||||
fnvlist_add_uint64(nv, ZPOOL_CONFIG_ASHIFT, vd->vdev_ashift);
|
||||
|
||||
if (!(flags & (VDEV_CONFIG_SPARE | VDEV_CONFIG_L2CACHE)) &&
|
||||
vd == vd->vdev_top) {
|
||||
fnvlist_add_uint64(nv, ZPOOL_CONFIG_METASLAB_ARRAY,
|
||||
|
||||
Reference in New Issue
Block a user