Skip to content

Commit 13b214c

Browse files
fix(rebuild): reconnect log on own channel when faulting
When an IO fails to submit the channel is removed right away. This means if another IO reaches the channel before the retire or the channel traversal then it might not get logged. This change ensures it is logged by reconnecting the IO log straight away. Signed-off-by: Tiago Castro <tiagolobocastro@gmail.com>
1 parent 90edaba commit 13b214c

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

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

+8-2
Original file line numberDiff line numberDiff line change
@@ -346,8 +346,14 @@ impl<'n> NexusChannel<'n> {
346346
child_device: &str,
347347
reason: FaultReason,
348348
) -> Option<IOLogChannel> {
349-
self.nexus_mut()
350-
.retire_child_device(child_device, reason, true)
349+
let Some(io_log) =
350+
self.nexus_mut()
351+
.retire_child_device(child_device, reason, true)
352+
else {
353+
return None;
354+
};
355+
self.reconnect_io_logs();
356+
Some(io_log)
351357
}
352358

353359
/// Returns core on which channel was created.

0 commit comments

Comments
 (0)