From 28f1e7456c047e491b9c7952633e3fc28821b711 Mon Sep 17 00:00:00 2001 From: Alan Hanson Date: Fri, 23 Feb 2024 22:48:49 +0000 Subject: [PATCH] Deactivate the read only parent after a scrub If the scrub on a read only parent finishes without error, then send a deactivate to force a disconnect from all the downstairs. --- upstairs/src/volume.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/upstairs/src/volume.rs b/upstairs/src/volume.rs index 673a3cba5..4eb56b705 100644 --- a/upstairs/src/volume.rs +++ b/upstairs/src/volume.rs @@ -445,6 +445,13 @@ impl Volume { pause_millis, ); self.flush(None).await?; + info!(self.log, "Deactivate read only parent {}", self.uuid,); + if let Err(e) = read_only_parent.deactivate().await { + warn!( + self.log, + "deactivate ROP on {} failed with {}", self.uuid, e + ); + } } else { info!(self.log, "Scrub for {} not required", self.uuid); }