update after review

Signed-off-by: Lou <luogj@cn.ibm.com>
This commit is contained in:
Lou 2020-01-09 20:21:21 +08:00 committed by Srini Brahmaroutu
parent 3651c2ef51
commit 241ff06ccc

View File

@ -294,7 +294,7 @@ func (mounter *SafeFormatAndMount) checkAndRepairXfsFilesystem(source string) er
klog.Warningf("Filesystem corruption was detected for %s, running xfs_repair to repair", source) klog.Warningf("Filesystem corruption was detected for %s, running xfs_repair to repair", source)
out, err := mounter.Exec.Command("xfs_repair", args...).CombinedOutput() out, err := mounter.Exec.Command("xfs_repair", args...).CombinedOutput()
if err != nil { if err != nil {
return fmt.Errorf("'xfs_repair' found errors on device %s but could not correct them: %s\n", source, out) return NewMountError(HasFilesystemErrors, "'xfs_repair' found errors on device %s but could not correct them: %s\n", source, out)
} else { } else {
klog.Infof("Device %s has errors which were corrected by xfs_repair.", source) klog.Infof("Device %s has errors which were corrected by xfs_repair.", source)
return nil return nil