Skip to content

Commit

Permalink
Merge #1621
Browse files Browse the repository at this point in the history
1621: fix(rebuild): connect the io log when detaching r=tiagolobocastro a=tiagolobocastro

When we detach a device, ensure that the io logs are connected. This usually happens on the fault path, however this change ensures that this happens during the detach itself and thus hardening it against races.

Co-authored-by: Tiago Castro <[email protected]>
  • Loading branch information
mayastor-bors and tiagolobocastro committed Apr 4, 2024
2 parents fbaee6a + 6e50c17 commit 007ab46
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions io-engine/src/bdev/nexus/nexus_channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,12 @@ impl<'n> NexusChannel<'n> {
self.detached.push(t);
}

// Since we've removed the device from the IO path, make sure we
// reconnect the io logs in case we haven't done so yet.
// Otherwise, a given channel might never see an error for this device
// and will therefore not log the IOs until a reconnect_io_logs.
self.reconnect_io_logs();

debug!("{self:?}: device '{device_name}' detached");

if is_channel_debug_enabled() {
Expand Down

0 comments on commit 007ab46

Please sign in to comment.