Skip to content

Commit

Permalink
code style
Browse files Browse the repository at this point in the history
  • Loading branch information
王怀宗 authored and ShyamsundarR committed Apr 25, 2019
1 parent a6bb48e commit 08c1305
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pkg/cephfs/mountcache.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ func remountCachedVolumes() error {
if err := mountOneCacheEntry(ce, me); err == nil {
remountSuccCount++
volumeMountCache.volumes[me.VolumeID] = *me
klog.Infof("mount-cache: remount volume %s success", volID)
klog.Infof("mount-cache: successfully remounted volume %s", volID)
} else {
remountFailCount++
klog.Errorf("mount-cache: remount volume cache %s fail", volID)
klog.Errorf("mount-cache: failed to remount volume %s", volID)
}
}
return nil
Expand All @@ -77,9 +77,9 @@ func remountCachedVolumes() error {
return err
}
if remountFailCount > 0 {
klog.Infof("mount-cache: success remount %d volumes, fail remount %d volumes", remountSuccCount, remountFailCount)
klog.Infof("mount-cache: successfully remounted %d volumes, failed to remount %d volumes", remountSuccCount, remountFailCount)
} else {
klog.Infof("mount-cache: volume cache num %d, all succ remount", remountSuccCount)
klog.Infof("mount-cache: successfully remounted %d volumes", remountSuccCount)
}
return nil
}
Expand Down Expand Up @@ -157,13 +157,13 @@ func cleanupMountPoint(mountPoint string) error {
klog.Infof("mount-cache: corrupted mount point %s, need unmount", mountPoint)
err := execCommandErr("umount", mountPoint)
if err != nil {
klog.Infof("mount-cache: unmount %s fail %v", mountPoint, err)
klog.Infof("mount-cache: failed to umount %s %v", mountPoint, err)
//ignore error return err
}
}
}
if _, err := os.Stat(mountPoint); err != nil {
klog.Errorf("mount-cache: mount point %s stat fail %v", mountPoint, err)
klog.Errorf("mount-cache: failed to stat mount point %s %v", mountPoint, err)
return err
}
return nil
Expand Down

0 comments on commit 08c1305

Please sign in to comment.