runtime: add hugepages support

Add hugepages support, port from:
b486387cba

Signed-off-by: Pradipta Banerjee <pradipta.banerjee@gmail.com>
Signed-off-by: bin <bin@hyper.sh>
This commit is contained in:
bin
2021-12-23 14:02:11 +08:00
parent 7df677c01e
commit 81a8baa5e5
9 changed files with 168 additions and 11 deletions

View File

@@ -75,7 +75,7 @@ func PmemDeviceInfo(source, destination string) (*DeviceInfo, error) {
return nil, fmt.Errorf("backing file %v has not PFN signature", device.HostPath)
}
_, fstype, err := utils.GetDevicePathAndFsType(source)
_, fstype, _, err := utils.GetDevicePathAndFsTypeOptions(source)
if err != nil {
pmemLog.WithError(err).WithField("mount-point", source).Warn("failed to get fstype: using ext4")
fstype = "ext4"