Skip to content

Commit

Permalink
fix(rebuild): reconnect log on own channel when faulting
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
tiagolobocastro committed Apr 4, 2024
1 parent 007ab46 commit f9108d0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions io-engine/src/bdev/nexus/nexus_channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,14 @@ impl<'n> NexusChannel<'n> {
child_device: &str,
reason: FaultReason,
) -> Option<IOLogChannel> {
self.nexus_mut()
.retire_child_device(child_device, reason, true)
let Some(io_log) =
self.nexus_mut()
.retire_child_device(child_device, reason, true)
else {
return None;
};
self.reconnect_io_logs();
Some(io_log)
}

/// Returns core on which channel was created.
Expand Down

0 comments on commit f9108d0

Please sign in to comment.