From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH 6/6] nfs: disable leases over NFS Date: Sat, 30 Jun 2007 10:25:16 +0100 Message-ID: <20070630092516.GD22050@infradead.org> References: <6e0beaf3e950494a6903571f0b5c9b61fc7bf650.1183143819.git.bfields@citi.umich.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Andrew Morton , linux-fsdevel@vger.kernel.org, "J. Bruce Fields" , Peter Staubach , Trond Myklebust To: "J. Bruce Fields" Return-path: Received: from pentafluge.infradead.org ([213.146.154.40]:47346 "EHLO pentafluge.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751679AbXF3JZU (ORCPT ); Sat, 30 Jun 2007 05:25:20 -0400 Content-Disposition: inline In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Fri, Jun 29, 2007 at 03:21:30PM -0400, J. Bruce Fields wrote: > From: J. Bruce Fields > > As Peter Staubach says elsewhere > (http://marc.info/?l=linux-kernel&m=118113649526444&w=2): > > > The problem is that some file system such as NFSv2 and NFSv3 do > > not have sufficient support to be able to support leases correctly. > > In particular for these two file systems, there is no over the wire > > protocol support. > > > > Currently, these two file systems fail the fcntl(F_SETLEASE) call > > accidentally, due to a reference counting difference. These file > > systems should fail more consciously, with a proper error to > > indicate that the call is invalid for them. > > Define an nfs setlease method that just returns -EOPNOTSUPP. > > If someone can demonstrate a real need, perhaps we could reenable > them in the presence of the "nolock" mount option. I'm not a big fan of default methods that do the wrong thing instead of just missing functionality. Would you mind just returning -EOPNOTSUPP if ->setlease is not implemented and add it to all the local filesystems while all the network/distributed filesystems should not have it, not just nfs.