pmem

package
v0.11.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL