Skip to content

Commit

Permalink
Merge #1620
Browse files Browse the repository at this point in the history
1620: 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 71e5a32 + 86c1aea commit 90edaba
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 @@ -237,6 +237,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");
}

Expand Down

0 comments on commit 90edaba

Please sign in to comment.