Skip to content

Commit 6e50c17

Browse files
fix(rebuild): connect the io log when detaching
When we detach a device, ensure that the io logs are connected. This usually happens on the fault path, however this change ensures that this happens during the detach itself and thus hardening it against races. Signed-off-by: Tiago Castro <tiagolobocastro@gmail.com>
1 parent fbaee6a commit 6e50c17

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

io-engine/src/bdev/nexus/nexus_channel.rs

+6
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,12 @@ impl<'n> NexusChannel<'n> {
238238
self.detached.push(t);
239239
}
240240

241+
// Since we've removed the device from the IO path, make sure we
242+
// reconnect the io logs in case we haven't done so yet.
243+
// Otherwise, a given channel might never see an error for this device
244+
// and will therefore not log the IOs until a reconnect_io_logs.
245+
self.reconnect_io_logs();
246+
241247
debug!("{self:?}: device '{device_name}' detached");
242248

243249
if is_channel_debug_enabled() {

0 commit comments

Comments
 (0)