From 43d63ab2d4c1611e290080c1f39fe885b277f72f Mon Sep 17 00:00:00 2001 From: Ameer Hamza <106930537+ixhamza@users.noreply.github.com> Date: Sat, 19 Nov 2022 00:39:59 +0500 Subject: [PATCH] zed: post a udev change event from spa_vdev_attach() In order for zed to process the removal event correctly, udev change event needs to be posted to sync the blkid information. spa_create() and spa_config_update() posts the event already through spa_write_cachefile(). Doing the same for spa_vdev_attach() that handles the case for vdev attachment and replacement. Reviewed-by: Brian Behlendorf Reviewed-by: Richard Yao Reviewed-by: Alexander Motin Reviewed-by: Ryan Moeller Signed-off-by: Ameer Hamza Closes #14172 --- module/zfs/spa_misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/zfs/spa_misc.c b/module/zfs/spa_misc.c index 4461b985fd..a57f0727db 100644 --- a/module/zfs/spa_misc.c +++ b/module/zfs/spa_misc.c @@ -1291,7 +1291,7 @@ spa_vdev_config_exit(spa_t *spa, vdev_t *vd, uint64_t txg, int error, char *tag) * If the config changed, update the config cache. */ if (config_changed) - spa_write_cachefile(spa, B_FALSE, B_TRUE, B_FALSE); + spa_write_cachefile(spa, B_FALSE, B_TRUE, B_TRUE); } /*