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 <behlendorf1@llnl.gov>
Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ameer Hamza <ahamza@ixsystems.com>
Closes #14172
This commit is contained in:
Ameer Hamza 2022-11-19 00:39:59 +05:00 committed by GitHub
parent 3226e0dc8e
commit 3a74f488fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1290,7 +1290,7 @@ spa_vdev_config_exit(spa_t *spa, vdev_t *vd, uint64_t txg, int error,
* If the config changed, update the config cache. * If the config changed, update the config cache.
*/ */
if (config_changed) if (config_changed)
spa_write_cachefile(spa, B_FALSE, B_TRUE, B_FALSE); spa_write_cachefile(spa, B_FALSE, B_TRUE, B_TRUE);
} }
/* /*