From 244c261c48b60a552bb96549a864f66561fce62d Mon Sep 17 00:00:00 2001 From: Tiago Castro Date: Thu, 4 Apr 2024 19:55:44 +0100 Subject: [PATCH] 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 --- io-engine/src/bdev/nexus/nexus_channel.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/io-engine/src/bdev/nexus/nexus_channel.rs b/io-engine/src/bdev/nexus/nexus_channel.rs index 16d1340d4..831d9c969 100644 --- a/io-engine/src/bdev/nexus/nexus_channel.rs +++ b/io-engine/src/bdev/nexus/nexus_channel.rs @@ -373,8 +373,14 @@ impl<'n> NexusChannel<'n> { child_device: &str, reason: FaultReason, ) -> Option { - 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.