HomeFreeBSD

zed: Fix config_sync autoexpand flood

Description

zed: Fix config_sync autoexpand flood

Users were seeing floods of config_sync events when autoexpand was
enabled. This happened because all "disk status change" udev events
invoke the autoexpand codepath, which calls zpool_relabel_disk(),
which in turn cause another "disk status change" event to happen,
in a feedback loop. Note that "disk status change" happens every time
a user calls close() on a block device.

This commit breaks the feedback loop by only allowing an autoexpand
to happen if the disk actually changed size.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Closes: #7132
Closes: #7366
Closes #13729

Details

Provenance
Tony Hutter <hutter2@llnl.gov>Authored on Sep 8 2022, 5:32 PM
Parents
rG2010c183bcc1: Add xattr_handler support for Android kernels
Branches
Unknown
Tags
Unknown

Event Timeline

Tony Hutter <hutter2@llnl.gov> committed rG7bbfac9d04dc: zed: Fix config_sync autoexpand flood (authored by Tony Hutter <hutter2@llnl.gov>).Sep 14 2022, 4:57 PM