Skip to content

Commit f9108d0

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 007ab46 commit f9108d0

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
@@ -373,8 +373,14 @@ impl<'n> NexusChannel<'n> {
373373
child_device: &str,
374374
reason: FaultReason,
375375
) -> Option<IOLogChannel> {
376-
self.nexus_mut()
377-
.retire_child_device(child_device, reason, true)
376+
let Some(io_log) =
377+
self.nexus_mut()
378+
.retire_child_device(child_device, reason, true)
379+
else {
380+
return None;
381+
};
382+
self.reconnect_io_logs();
383+
Some(io_log)
378384
}
379385

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

0 commit comments

Comments
 (0)