aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmeer Hamza <106930537+ixhamza@users.noreply.github.com>2022-11-18 19:39:59 +0000
committerBrian Behlendorf <behlendorf1@llnl.gov>2023-03-27 18:32:09 +0000
commit43d63ab2d4c1611e290080c1f39fe885b277f72f (patch)
tree880dcd63a578c671f299a82c03139e6bdfda01bb
parentbd9a9a4e1ad34d9d1c63746a662c34fffa89204f (diff)
downloadsrc-43d63ab2d4c1611e290080c1f39fe885b277f72f.tar.gz
src-43d63ab2d4c1611e290080c1f39fe885b277f72f.zip
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
-rw-r--r--module/zfs/spa_misc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/module/zfs/spa_misc.c b/module/zfs/spa_misc.c
index 4461b985fd3b..a57f0727db31 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);
}
/*