empty_dir: Check if hugetlbfs volume is mounted with a correct pagesize
Extended GetMountMedium function to check if hugetlbfs volume is mounted with the page size equal to the medium size. Page size is obtained from the 'pagesize' mount option of the mounted hugetlbfs volume.
This commit is contained in:
@@ -19,6 +19,7 @@ limitations under the License.
|
||||
package emptydir
|
||||
|
||||
import (
|
||||
"k8s.io/apimachinery/pkg/api/resource"
|
||||
"k8s.io/utils/mount"
|
||||
|
||||
v1 "k8s.io/api/core/v1"
|
||||
@@ -29,6 +30,6 @@ type realMountDetector struct {
|
||||
mounter mount.Interface
|
||||
}
|
||||
|
||||
func (m *realMountDetector) GetMountMedium(path string) (v1.StorageMedium, bool, error) {
|
||||
return v1.StorageMediumDefault, false, nil
|
||||
func (m *realMountDetector) GetMountMedium(path string, requestedMedium v1.StorageMedium) (v1.StorageMedium, bool, *resource.Quantity, error) {
|
||||
return v1.StorageMediumDefault, false, nil, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user