You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
metadata.len() returns 0 when trying to mmap files such as block
devices and devdax (character devices) that are not regular files,
hence returning MappingPastEof even if the mapping would fit at the
provided file_offset.
This patch adds support for checking the size of devdax and block
devices, and returns a new error, InvalidFileType, if the mmap being
created is not for a regular file, block or devdax device, or if the
size the devices couldn't be found in sysfs.
Usecase:
Devdax and block devices can be used in cloud-hypervisor as
memory-zone. MmapRegion::build from vm-memory is called while
creating a GuestRegionMmap for the VM memory-zone.
Reviewed-by: Fam Zheng <[email protected]>
Signed-off-by: Usama Arif <[email protected]>
0 commit comments