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

@@ -470,7 +470,7 @@ func IsEphemeralStorage(path string) bool {
return false
}
if _, fsType, _ := utils.GetDevicePathAndFsType(path); fsType == "tmpfs" {
if _, fsType, _, _ := utils.GetDevicePathAndFsTypeOptions(path); fsType == "tmpfs" {
return true
}
@@ -485,7 +485,7 @@ func Isk8sHostEmptyDir(path string) bool {
return false
}
if _, fsType, _ := utils.GetDevicePathAndFsType(path); fsType != "tmpfs" {
if _, fsType, _, _ := utils.GetDevicePathAndFsTypeOptions(path); fsType != "tmpfs" {
return true
}
return false