Skip to content

Commit c2d5bfb

Browse files
mayastor-borstiagolobocastro
mayastor-bors
andcommitted
Merge #1623
1623: fix(rebuild): reconnect log on own channel when faulting r=tiagolobocastro a=tiagolobocastro 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. Co-authored-by: Tiago Castro <tiagolobocastro@gmail.com>
2 parents 90edaba + 13b214c commit c2d5bfb

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)