mirror of https://github.com/k3s-io/k3s
Merge pull request #50503 from karataliu/mount_clean
Automatic merge from submit-queue (batch tested with PRs 43016, 50503, 51281, 51518, 51582). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.. Clean up diskLooksUnformatted literal **What this PR does / why we need it**: #16948 moved the `formatAndMount` function to mount_linux.go, but `diskLooksUnformatted` does not necessarily need to appear in mount_unsupported.go #31515 Renames `diskLooksUnformatted` to `getDiskFormat`, but did not update the comment This is to do the small cleanup. **Which issue this PR fixes** **Special notes for your reviewer**: **Release note**:pull/6/head
commit
980a8e6367
|
@ -424,7 +424,7 @@ func (mounter *SafeFormatAndMount) formatAndMount(source string, target string,
|
|||
return mountErr
|
||||
}
|
||||
|
||||
// diskLooksUnformatted uses 'lsblk' to see if the given disk is unformated
|
||||
// getDiskFormat uses 'lsblk' to see if the given disk is unformated
|
||||
func (mounter *SafeFormatAndMount) getDiskFormat(disk string) (string, error) {
|
||||
args := []string{"-n", "-o", "FSTYPE", disk}
|
||||
glog.V(4).Infof("Attempting to determine if disk %q is formatted using lsblk with args: (%v)", disk, args)
|
||||
|
|
|
@ -74,7 +74,3 @@ func (mounter *Mounter) MakeRShared(path string) error {
|
|||
func (mounter *SafeFormatAndMount) formatAndMount(source string, target string, fstype string, options []string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (mounter *SafeFormatAndMount) diskLooksUnformatted(disk string) (bool, error) {
|
||||
return true, nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue