From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Howells Subject: Re: [PATCH] AFS: Implement shared-writable mmap [try #2] Date: Thu, 17 May 2007 13:30:01 +0100 Message-ID: <6333.1179405001@redhat.com> References: <464BF8B2.3080101@yahoo.com.au> <464B3F2D.9030603@yahoo.com.au> <464B3209.4010003@yahoo.com.au> <464B07EC.4050308@yahoo.com.au> <464AF3F3.30204@yahoo.com.au> <20070516100225.18685.51699.stgit@warthog.cambridge.redhat.com> <17173.1179321391@redhat.com> <19714.1179331928@redhat.com> <23262.1179334587@redhat.com> <31162.1179341123@redhat.com> Cc: akpm@osdl.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org To: Nick Piggin Return-path: Received: from mx1.redhat.com ([66.187.233.31]:46254 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754693AbXEQMb0 (ORCPT ); Thu, 17 May 2007 08:31:26 -0400 In-Reply-To: <464BF8B2.3080101@yahoo.com.au> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Nick Piggin wrote: > No, you shouldn't. We could theoretically introduce a new API for this, > but I think it would be preferable if you can fix the race in the fs. Actually, I might be able to do better. When making a StoreData call to the AFS server, I send all the parameters first, and at that point, the server will abort it, I think, if permission is not available, and won't wait for the payload to be delivered. So if I tell AF_RXRPC to send the parameter data with an explicit ACK request and then wait till it's either hard-ACK'd or aborted, I should then be able to deal with the permissions failure at a state where I have locked *all* the pages to be sent. At that point, I should be able to tell truncate to simple discard all these locked pages. How's that sound? David