mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
virtio-devices, block: Reject sector 0 discard/"write zeroes" requests
As well as rejecting writes to sector 0 in the case of raw files where the user hasn't specified the image_type also reject virtio requests of type discard and write_zeroes. Signed-off-by: Rob Bradford <rbradford@meta.com>
This commit is contained in:
@@ -263,6 +263,7 @@ impl BlockEpollHandler {
|
||||
self.disk_nsectors.load(Ordering::SeqCst),
|
||||
self.disk_image.as_mut(),
|
||||
&self.serial,
|
||||
self.disable_sector0_writes,
|
||||
desc_chain.head_index() as u64,
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user