diff --git a/virtio-devices/src/block.rs b/virtio-devices/src/block.rs index c7fc934c4..0f46ce389 100644 --- a/virtio-devices/src/block.rs +++ b/virtio-devices/src/block.rs @@ -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.logical_size().map_or_else( + self.disk_image.physical_size().map_or_else( // use a safe fallback |e| { let fallback = LockGranularity::WholeFile;