mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-18 11:00:25 +00:00
code style
This commit is contained in:
parent
f3e5f83ee0
commit
6de862d6cb
@ -64,10 +64,10 @@ func remountCachedVolumes() error {
|
|||||||
if err := mountOneCacheEntry(ce, me); err == nil {
|
if err := mountOneCacheEntry(ce, me); err == nil {
|
||||||
remountSuccCount++
|
remountSuccCount++
|
||||||
volumeMountCache.volumes[me.VolumeID] = *me
|
volumeMountCache.volumes[me.VolumeID] = *me
|
||||||
klog.Infof("mount-cache: remount volume %s success", volID)
|
klog.Infof("mount-cache: successfully remounted volume %s", volID)
|
||||||
} else {
|
} else {
|
||||||
remountFailCount++
|
remountFailCount++
|
||||||
klog.Errorf("mount-cache: remount volume cache %s fail", volID)
|
klog.Errorf("mount-cache: failed to remount volume %s", volID)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
@ -77,9 +77,9 @@ func remountCachedVolumes() error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if remountFailCount > 0 {
|
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 {
|
} else {
|
||||||
klog.Infof("mount-cache: volume cache num %d, all succ remount", remountSuccCount)
|
klog.Infof("mount-cache: successfully remounted %d volumes", remountSuccCount)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -157,13 +157,13 @@ func cleanupMountPoint(mountPoint string) error {
|
|||||||
klog.Infof("mount-cache: corrupted mount point %s, need unmount", mountPoint)
|
klog.Infof("mount-cache: corrupted mount point %s, need unmount", mountPoint)
|
||||||
err := execCommandErr("umount", mountPoint)
|
err := execCommandErr("umount", mountPoint)
|
||||||
if err != nil {
|
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
|
//ignore error return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if _, err := os.Stat(mountPoint); err != nil {
|
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 err
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
Reference in New Issue
Block a user