Skip to content

Commit

Permalink
zed: post a udev change event from spa_vdev_attach()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Richard Yao <[email protected]>
Reviewed-by: Alexander Motin <[email protected]>
Reviewed-by: Ryan Moeller <[email protected]>
Signed-off-by: Ameer Hamza <[email protected]>
Closes openzfs#14172
  • Loading branch information
ixhamza authored Nov 18, 2022
1 parent 3226e0d commit 3a74f48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion module/zfs/spa_misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 (config_changed)
spa_write_cachefile(spa, B_FALSE, B_TRUE, B_FALSE);
spa_write_cachefile(spa, B_FALSE, B_TRUE, B_TRUE);
}

/*
Expand Down

0 comments on commit 3a74f48

Please sign in to comment.