mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Merge pull request #84413 from cofyc/update-mount-comments
cleanup: Update comments of SearchMountPoints/GetMountRefs
This commit is contained in:
commit
00deec8719
@ -48,7 +48,7 @@ type Interface interface {
|
|||||||
// most notably linux bind mounts and symbolic link.
|
// most notably linux bind mounts and symbolic link.
|
||||||
IsLikelyNotMountPoint(file string) (bool, error)
|
IsLikelyNotMountPoint(file string) (bool, error)
|
||||||
// GetMountRefs finds all mount references to the path, returns a
|
// GetMountRefs finds all mount references to the path, returns a
|
||||||
// list of paths. Path could be a mountpoint path, device or a normal
|
// list of paths. Path could be a mountpoint or a normal
|
||||||
// directory (for bind mount).
|
// directory (for bind mount).
|
||||||
GetMountRefs(pathname string) ([]string, error)
|
GetMountRefs(pathname string) ([]string, error)
|
||||||
}
|
}
|
||||||
|
@ -238,7 +238,7 @@ func (mounter *Mounter) IsLikelyNotMountPoint(file string) (bool, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// GetMountRefs finds all mount references to pathname, returns a
|
// GetMountRefs finds all mount references to pathname, returns a
|
||||||
// list of paths. Path could be a mountpoint path, device or a normal
|
// list of paths. Path could be a mountpoint or a normal
|
||||||
// directory (for bind mount).
|
// directory (for bind mount).
|
||||||
func (mounter *Mounter) GetMountRefs(pathname string) ([]string, error) {
|
func (mounter *Mounter) GetMountRefs(pathname string) ([]string, error) {
|
||||||
pathExists, pathErr := PathExists(pathname)
|
pathExists, pathErr := PathExists(pathname)
|
||||||
@ -441,7 +441,8 @@ func parseProcMounts(content []byte) ([]MountPoint, error) {
|
|||||||
|
|
||||||
// SearchMountPoints finds all mount references to the source, returns a list of
|
// SearchMountPoints finds all mount references to the source, returns a list of
|
||||||
// mountpoints.
|
// mountpoints.
|
||||||
// This function assumes source cannot be device.
|
// The source can be a mount point or a normal directory (bind mount). We
|
||||||
|
// didn't support device because there is no use case by now.
|
||||||
// Some filesystems may share a source name, e.g. tmpfs. And for bind mounting,
|
// Some filesystems may share a source name, e.g. tmpfs. And for bind mounting,
|
||||||
// it's possible to mount a non-root path of a filesystem, so we need to use
|
// it's possible to mount a non-root path of a filesystem, so we need to use
|
||||||
// root path and major:minor to represent mount source uniquely.
|
// root path and major:minor to represent mount source uniquely.
|
||||||
|
Loading…
Reference in New Issue
Block a user