Skip to content

Commit

Permalink
Merge pull request #850 from bmr-cymru/bmr-resume-udev-flags
Browse files Browse the repository at this point in the history
Make CacheDev, LinearDev and ThinPoolDev private on resume()
  • Loading branch information
mulkieran authored Apr 13, 2023
2 parents 8a0376c + 4c0950f commit 1e3df50
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/shared.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ pub trait DmDevice<T: TargetTable> {

/// Resume I/O on the device.
fn resume(&mut self, dm: &DM) -> DmResult<()> {
dm.device_suspend(&DevId::Name(self.name()), DmOptions::default())?;
dm.device_suspend(&DevId::Name(self.name()), DmOptions::private())?;
Ok(())
}

Expand Down
5 changes: 5 additions & 0 deletions src/thindev.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,11 @@ impl DmDevice<ThinDevTargetTable> for ThinDev {
name!(self)
}

fn resume(&mut self, dm: &DM) -> DmResult<()> {
dm.device_suspend(&DevId::Name(self.name()), DmOptions::default())?;
Ok(())
}

fn size(&self) -> Sectors {
self.table.table.length
}
Expand Down

0 comments on commit 1e3df50

Please sign in to comment.