correctly report volume with input/output error to master (#6790)

* correctly capture io error and report to master

* code fix

* check io error by error.Is

---------

Co-authored-by: dongxu_feng <dongxu_feng@intsig.net>
This commit is contained in:
dongxufeng
2025-05-15 15:56:43 +08:00
committed by GitHub
parent d8c574a5ef
commit ff878a542d
3 changed files with 21 additions and 15 deletions

View File

@@ -5,6 +5,7 @@ import (
"errors"
"fmt"
"os"
"syscall"
"github.com/seaweedfs/seaweedfs/weed/glog"
"github.com/seaweedfs/seaweedfs/weed/storage/backend"
@@ -23,7 +24,7 @@ func (v *Volume) checkReadWriteError(err error) {
}
return
}
if err.Error() == "input/output error" {
if errors.Is(err, syscall.EIO) {
v.lastIoError = err
}
}