Sync AUX label during pool import

Spare and l2cache vdev labels are not updated during import. Therefore,
if disk paths are updated between pool export and import, the AUX label
still shows the old paths. This patch syncs the AUX label
during import to show the correct path information.

Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Umer Saleem <usaleem@ixsystems.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Ameer Hamza <ahamza@ixsystems.com>
Closes #15817
This commit is contained in:
Ameer Hamza
2024-08-09 03:16:46 +05:00
committed by GitHub
parent 0ccd4b9d01
commit 5536c0dee2
3 changed files with 82 additions and 44 deletions
+1
View File
@@ -146,6 +146,7 @@ struct spa_aux_vdev {
vdev_t **sav_vdevs; /* devices */
int sav_count; /* number devices */
boolean_t sav_sync; /* sync the device list */
boolean_t sav_label_sync; /* sync aux labels */
nvlist_t **sav_pending; /* pending device additions */
uint_t sav_npending; /* # pending devices */
};