From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from zeniv.linux.org.uk ([195.92.253.2]:52547 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752140AbcAVTuf (ORCPT ); Fri, 22 Jan 2016 14:50:35 -0500 Date: Fri, 22 Jan 2016 19:50:32 +0000 From: Al Viro To: Mike Marshall Cc: Linus Torvalds , linux-fsdevel Subject: Re: Orangefs ABI documentation Message-ID: <20160122195032.GD17997@ZenIV.linux.org.uk> References: <20160122071147.GY17997@ZenIV.linux.org.uk> <20160122170838.GZ17997@ZenIV.linux.org.uk> <20160122174338.GA17997@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Fri, Jan 22, 2016 at 01:17:40PM -0500, Mike Marshall wrote: > >> Objections, comments? > > I have no objections so far to your suggestions, I'm trying to keep > my co-workers looking in on this discussion... most other days > we're all lined up in adjacent cubes... FWIW, I do see a problem there. This "submitter has given up" flag would need to be cleared on retries ;-/ When can we end up retrying? We'd need * wait_for_cancellation_downcall/wait_for_matching_downcall finished * op_state_serviced(op) false * op->downcall.status set to -EAGAIN wait_for_matching_downcall() either returns with op_state_serviced() or returns one -ETIMEDOUT, -EINTR, -EAGAIN or -EIO, with its return value ending up in op->downcall.status. So if it was wait_for_matching_downcall(), we'd have to have returned -EAGAIN. Which can happen only with op_state_purged(op), i.e. with character device having been closed after the sucker had been placed on the lists... wait_for_cancellation_downcall() similar, but it never returns -EAGAIN. IOW, for it retries are irrelevant. Damnit, what's the point of picking a purged request from the request list in orangefs_devreq_read()? Ditto for orangefs_devreq_write_iter() and request hash... Note that purge *can't* happen during either of those - ->release() can't be called while something is in ->read() or ->write_iter(). So if we would ignore purged requests in those, the problem with retries clearing the "I gave up" flag wouldn't exist... It's a race anyway - submitter had been woken up when we'd been marking the request as purged, and it's going to remove the sucker from whatever list it's on very soon after getting woken up. Do you see any problems with skipping such request list/hash elements in orangefs_devreq_read()/orangefs_devreq_write_iter() resp.?