Merge pull request #41778 from NickrenREN/volume-typo

Automatic merge from submit-queue (batch tested with PRs 38702, 41810, 41778, 41858, 41872)

fix some typos and var style

**Release note**:

```NONE
```
pull/6/head
Kubernetes Submit Queue 2017-02-23 07:54:37 -08:00 committed by GitHub
commit e373b5981a
1 changed files with 17 additions and 17 deletions

View File

@ -71,15 +71,15 @@ type Metrics struct {
// InodesUsed represents the total inodes used by the Volume.
InodesUsed *resource.Quantity
// Inodes represents the total number of inodes availible in the volume.
// Inodes represents the total number of inodes available in the volume.
// For volumes that share a filesystem with the host (e.g. emptydir, hostpath),
// this is the inodes available in the underlying storage,
// and will not equal InodesUsed + InodesFree as the fs is shared.
Inodes *resource.Quantity
// InodesFree represent the inodes available for the volume. For Volues that share
// InodesFree represent the inodes available for the volume. For Volumes that share
// a filesystem with the host (e.g. emptydir, hostpath), this is the free inodes
// on the underlying sporage, and is shared with host processes and other volumes
// on the underlying storage, and is shared with host processes and other volumes
InodesFree *resource.Quantity
}
@ -154,7 +154,7 @@ type Deleter interface {
// as error and it will be sent as "Info" event to the PV being deleted. The
// volume controller will retry deleting the volume in the next periodic
// sync. This can be used to postpone deletion of a volume that is being
// dettached from a node. Deletion of such volume would fail anyway and such
// detached from a node. Deletion of such volume would fail anyway and such
// error would confuse users.
Delete() error
}
@ -167,8 +167,8 @@ type Attacher interface {
Attach(spec *Spec, nodeName types.NodeName) (string, error)
// VolumesAreAttached checks whether the list of volumes still attached to the specified
// the node. It returns a map which maps from the volume spec to the checking result.
// If an error is occured during checking, the error will be returned
// node. It returns a map which maps from the volume spec to the checking result.
// If an error is occurred during checking, the error will be returned
VolumesAreAttached(specs []*Spec, nodeName types.NodeName) (map[*Spec]bool, error)
// WaitForAttach blocks until the device is attached to this
@ -271,16 +271,16 @@ func copyFolder(source string, dest string) (err error) {
continue
}
sourcefilepointer := source + "\\" + obj.Name()
destinationfilepointer := dest + "\\" + obj.Name()
sourceFilePointer := source + "\\" + obj.Name()
destinationFilePointer := dest + "\\" + obj.Name()
if obj.IsDir() {
err = copyFolder(sourcefilepointer, destinationfilepointer)
err = copyFolder(sourceFilePointer, destinationFilePointer)
if err != nil {
return err
}
} else {
err = copyFile(sourcefilepointer, destinationfilepointer)
err = copyFile(sourceFilePointer, destinationFilePointer)
if err != nil {
return err
}
@ -291,25 +291,25 @@ func copyFolder(source string, dest string) (err error) {
}
func copyFile(source string, dest string) (err error) {
sourcefile, err := os.Open(source)
sourceFile, err := os.Open(source)
if err != nil {
return err
}
defer sourcefile.Close()
defer sourceFile.Close()
destfile, err := os.Create(dest)
destFile, err := os.Create(dest)
if err != nil {
return err
}
defer destfile.Close()
defer destFile.Close()
_, err = io.Copy(destfile, sourcefile)
_, err = io.Copy(destFile, sourceFile)
if err == nil {
sourceinfo, err := os.Stat(source)
sourceInfo, err := os.Stat(source)
if err != nil {
err = os.Chmod(dest, sourceinfo.Mode())
err = os.Chmod(dest, sourceInfo.Mode())
}
}