mirror of
https://github.com/aljazceru/kata-containers.git
synced 2025-12-19 23:34:23 +01:00
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:
@@ -96,11 +96,12 @@ const (
|
||||
procDeviceIndex = iota
|
||||
procPathIndex
|
||||
procTypeIndex
|
||||
procOptionIndex
|
||||
)
|
||||
|
||||
// GetDevicePathAndFsType gets the device for the mount point and the file system type
|
||||
// of the mount.
|
||||
func GetDevicePathAndFsType(mountPoint string) (devicePath, fsType string, err error) {
|
||||
// GetDevicePathAndFsTypeOptions gets the device for the mount point, the file system type
|
||||
// and mount options
|
||||
func GetDevicePathAndFsTypeOptions(mountPoint string) (devicePath, fsType string, fsOptions []string, err error) {
|
||||
if mountPoint == "" {
|
||||
err = fmt.Errorf("Mount point cannot be empty")
|
||||
return
|
||||
@@ -134,6 +135,7 @@ func GetDevicePathAndFsType(mountPoint string) (devicePath, fsType string, err e
|
||||
if mountPoint == fields[procPathIndex] {
|
||||
devicePath = fields[procDeviceIndex]
|
||||
fsType = fields[procTypeIndex]
|
||||
fsOptions = strings.Split(fields[procOptionIndex], ",")
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user