Commit c18237fe authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 5b64b513
......@@ -83,12 +83,13 @@ func err2LogStatus(err error) fuse.Status {
// handling canceled -> EINTR, don't log
e := errors.Cause(err)
if e == context.Canceled {
switch e {
case context.Canceled:
return fuse.EINTR
case io.ErrClosedPipe:
return fuse.Status(syscall.ECONNRESET)
}
// XXX io.ErrClosedPipe -> EPIPE?
// otherwise log as warnings EINVAL and as errors everything else
switch e.(type) {
case *eInvalError:
......@@ -377,7 +378,7 @@ func (f *skFile) Write(data []byte, /*ignored*/off int64, fctx *fuse.Context) (u
err = nil
}
if err == io.ErrClosedPipe {
err = syscall.ECONNRESET // XXX better EPIPE?
err = syscall.ECONNRESET
}
if err != nil {
return 0, err2LogStatus(err)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment