classify grpc errors

This commit is contained in:
Chris Lu
2025-12-31 13:40:14 -08:00
parent f7f133166a
commit 998bcf2b3f
2 changed files with 57 additions and 2 deletions

View File

@@ -40,8 +40,14 @@ func (wfs *WFS) saveEntry(path util.FullPath, entry *filer_pb.Entry) (code fuse.
return nil
})
if err != nil {
glog.Errorf("saveEntry %s: %v", path, err)
return fuse.EIO
// glog.V(0).Infof("saveEntry %s: %v", path, err)
fuseStatus := grpcErrorToFuseStatus(err)
if fuseStatus == fuse.EIO {
glog.Errorf("saveEntry failed for %s: %v (returning EIO)", path, err)
} else {
glog.V(1).Infof("saveEntry failed for %s: %v (returning %v)", path, err, fuseStatus)
}
return fuseStatus
}
return fuse.OK