mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix: ignore e2fsck errors if retcode < 4 (#23490)
Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
This commit is contained in:
@@ -360,8 +360,10 @@ func (d *SFsutilDriver) FsckExtFs(fpath string) bool {
|
||||
log.Debugf("Exec command: %v", []string{"e2fsck", "-f", "-p", fpath})
|
||||
retCode, stdout, stderr, err := d.ExecInputWait("e2fsck", []string{"-f", "-p", fpath}, nil)
|
||||
if err != nil {
|
||||
log.Errorf("exec e2fsck failed %s", err)
|
||||
return false
|
||||
log.Errorf("exec e2fsck error %s retcode %d stdout %s stderr %s", err, retCode, stdout, stderr)
|
||||
if retCode >= 4 {
|
||||
return false
|
||||
}
|
||||
}
|
||||
if retCode < 4 {
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user