fix(lvol): referring lvol name after destroy
Fixed use of Lvol name after it has been freed.
This partially fixes
Fixes
@@ -315,12 +315,15 @@ impl Lvol {
r.await
.expect("lvol destroy callback is gone")
- .to_result(|e| Error::RepDestroy {
+ .to_result(|e| {
+ warn!("error while destroying lvol {}", name);
+ Error::RepDestroy {
source: Errno::from_i32(e),
- name: self.name(),
+ name: name.clone(),
+ }
})?;
- info!("Destroyed {}", name);
+ info!("destroyed lvol {}", name);
Ok(name)
}
