Commit eefea5e0 authored by Tommy Lindgren's avatar Tommy Lindgren

fuse: suppress ENOENT warnings for INTERRUPT responses

If writing the INTERRUPT response returns ENOENT it means that the
referred request is no longer known by the kernel. This is a normal if
the referred request already has completed. We thus suppress the scary
warning unless debugging is enabled.

Fixes #375.

Change-Id: I3266dbd8ad53a42db9e0e746e4734f284746b76c
parent e1b8a30f
...@@ -485,9 +485,16 @@ func (ms *Server) handleRequest(req *request) Status { ...@@ -485,9 +485,16 @@ func (ms *Server) handleRequest(req *request) Status {
errNo := ms.write(req) errNo := ms.write(req)
if errNo != 0 { if errNo != 0 {
// Unless debugging is enabled, ignore ENOENT for INTERRUPT responses
// which indicates that the referred request is no longer known by the
// kernel. This is a normal if the referred request already has
// completed.
if ms.opts.Debug || !(req.inHeader.Opcode == _OP_INTERRUPT && errNo == ENOENT) {
log.Printf("writer: Write/Writev failed, err: %v. opcode: %v", log.Printf("writer: Write/Writev failed, err: %v. opcode: %v",
errNo, operationName(req.inHeader.Opcode)) errNo, operationName(req.inHeader.Opcode))
} }
}
ms.returnRequest(req) ms.returnRequest(req)
return Status(errNo) return Status(errNo)
} }
......
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