mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
block: rename DiskFile::size() -> DiskFile::logical_size()
This better reflects the actual usage. Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de> On-behalf-of: SAP philipp.schuster@sap.com
This commit is contained in:
committed by
Rob Bradford
parent
0ddb032cab
commit
53092359b4
@@ -675,7 +675,7 @@ impl Block {
|
||||
)
|
||||
} else {
|
||||
let disk_size = disk_image
|
||||
.size()
|
||||
.logical_size()
|
||||
.map_err(|e| io::Error::other(format!("Failed getting disk size: {e}")))?;
|
||||
if disk_size % SECTOR_SIZE != 0 {
|
||||
warn!(
|
||||
@@ -773,7 +773,7 @@ impl Block {
|
||||
// TODO In future, we could add a `lock_granularity=` configuration to the CLI.
|
||||
// For now, we stick to QEMU behavior.
|
||||
fn lock_granularity(&mut self) -> LockGranularity {
|
||||
self.disk_image.size().map_or_else(
|
||||
self.disk_image.logical_size().map_or_else(
|
||||
// use a safe fallback
|
||||
|e| {
|
||||
let fallback = LockGranularity::WholeFile;
|
||||
|
||||
Reference in New Issue
Block a user