Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDevicePath ¶
GetDevicePath returns VPMem device path
func Mount ¶
func Mount( ctx context.Context, device uint32, target string, mappingInfo *guestresource.LCOWVPMemMappingInfo, verityInfo *guestresource.DeviceVerityInfo, ) (err error)
Mount mounts the pmem device at `/dev/pmem<device>` to `target` in a basic scenario. If either mappingInfo or verityInfo are non-nil, the device-mapper framework is used to create linear and verity targets accordingly. If both are non-nil, the linear target is created first and used as the data/hash device for the verity target.
`target` will be created. On mount failure the created `target` will be automatically cleaned up.
Note: For now the platform only supports readonly pmem that is assumed to be `ext4`.
Note: both mappingInfo and verityInfo can be non-nil at the same time, in that case linear target is created first and it becomes the data/hash device for verity target.
func Unmount ¶
func Unmount( ctx context.Context, devNumber uint32, target string, mappingInfo *guestresource.LCOWVPMemMappingInfo, verityInfo *guestresource.DeviceVerityInfo, ) (err error)
Unmount unmounts `target` and removes corresponding linear and verity targets when needed
Types ¶
This section is empty.