From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Howells Subject: Re: [PATCH] AFS: Implement file locking Date: Tue, 29 May 2007 13:43:29 +0100 Message-ID: <11388.1180442609@redhat.com> References: <20070527161252.GA12804@fieldses.org> <20070527022502.GB10867@fieldses.org> <20070526022342.GA20905@fieldses.org> <20070524165554.22292.38887.stgit@warthog.cambridge.redhat.com> <7436.1180223730@redhat.com> <18750.1180255870@redhat.com> Cc: akpm@osdl.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org To: "J. Bruce Fields" Return-path: Received: from mx1.redhat.com ([66.187.233.31]:42446 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751590AbXE2MoF (ORCPT ); Tue, 29 May 2007 08:44:05 -0400 In-Reply-To: <20070527161252.GA12804@fieldses.org> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org J. Bruce Fields wrote: > > At the moment, yes. Don't the POSIX and flock lock-handling routines in the > > kernel normally do that anyway? > > No, they'd upgrade in that case. I just checked. The OpenAFS server supports neither lock upgrading nor lock downgrading. Attempts to do either incur an abort with code 0x02f6df0a (which I believe to be equivalent to EAGAIN). This means that I can't practically support lock upgrading. Lock downgrading I can emulate by handing apparent readlocks to local processes whilst holding a writelock on the server. David