Made more firm some wording about interrupt semantics.

Now that I have some references to cite.
geesefs-0-30-9
Aaron Jacobs 2015-06-03 08:51:28 +10:00
parent d800860713
commit 3d04b93c8e
1 changed files with 10 additions and 7 deletions

View File

@ -225,10 +225,10 @@ func (c *Connection) beginOp(
// Set up a cancellation function. // Set up a cancellation function.
// //
// Special case: On Darwin, osxfuse appears to aggressively reuse "unique" // Special case: On Darwin, osxfuse aggressively reuses "unique" request IDs.
// request IDs. This matters for Forget requests, which have no reply // This matters for Forget requests, which have no reply associated and
// associated and therefore appear to have IDs that are immediately eligible // therefore have IDs that are immediately eligible for reuse. For these, we
// for reuse. For these, we should not record any state keyed on their ID. // should not record any state keyed on their ID.
// //
// Cf. https://github.com/osxfuse/osxfuse/issues/208 // Cf. https://github.com/osxfuse/osxfuse/issues/208
if _, ok := bfReq.(*bazilfuse.ForgetRequest); !ok { if _, ok := bfReq.(*bazilfuse.ForgetRequest); !ok {
@ -284,10 +284,13 @@ func (c *Connection) handleInterrupt(req *bazilfuse.InterruptRequest) {
// In particular, my reading of it is that an interrupt request cannot be // In particular, my reading of it is that an interrupt request cannot be
// delivered to userspace before the original request. The part about the // delivered to userspace before the original request. The part about the
// race and EAGAIN appears to be aimed at userspace programs that // race and EAGAIN appears to be aimed at userspace programs that
// concurrently process requests. // concurrently process requests (cf. http://goo.gl/BES2rs).
// //
// So in this method we assume that if we can't find the ID to be // So in this method if we can't find the ID to be interrupted, it means that
// interrupted, it means that the request has already been replied to. // the request has already been replied to.
//
// Cf. https://github.com/osxfuse/osxfuse/issues/208
// Cf. http://comments.gmane.org/gmane.comp.file-systems.fuse.devel/14675
cancel, ok := c.cancelFuncs[req.IntrID] cancel, ok := c.cancelFuncs[req.IntrID]
if !ok { if !ok {
return return