From: Christoph Hellwig Subject: Re: [PATCH 5/17] locks: factor out generic/filesystem switch from test_lock Date: Fri, 6 Apr 2007 18:46:55 +0100 Message-ID: <20070406174655.GE32549@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: akpm@osdl.org, Trond Myklebust , Marc Eshel , linux-fsdevel@vger.kernel.org To: "J. Bruce Fields" Return-path: Received: from pentafluge.infradead.org ([213.146.154.40]:50184 "EHLO pentafluge.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933679AbXDFRq7 (ORCPT ); Fri, 6 Apr 2007 13:46:59 -0400 Content-Disposition: inline Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Thu, Apr 05, 2007 at 07:40:55PM -0400, J. Bruce Fields wrote: > From: J. Bruce Fields - unquoted > > Factor out the code that switches between generic and filesystem-specific lock > methods; eventually we want to call this from lock managers (lockd and nfsd) > too; currently they only call the generic methods. > > This patch does that for test_lock. > > Note that this hasn't been necessary until recently, because the few > filesystems that define ->lock() (nfs, cifs...) aren't exportable via NFS. > However GFS (and, in the future, other cluster filesystems) need to implement > their own locking to get cluster-coherent locking, and also want to be able to > export locking to NFS (lockd and NFSv4). > > So we accomplish this by factoring out code such as this and exporting it for > the use of lockd and nfsd. Ok.