From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH 5/6] gfs2: stop giving out non-cluster-coherent leases Date: Sat, 30 Jun 2007 10:27:42 +0100 Message-ID: <20070630092742.GF22050@infradead.org> References: <6e0beaf3e950494a6903571f0b5c9b61fc7bf650.1183143819.git.bfields@citi.umich.edu> <1bdef6b017f0ccb94ed76dbdd2b4cc676e5ef312.1183143820.git.bfields@citi.umich.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Andrew Morton , linux-fsdevel@vger.kernel.org, Marc Eshel , "J. Bruce Fields" , Steven Whitehouse To: "J. Bruce Fields" Return-path: Received: from pentafluge.infradead.org ([213.146.154.40]:40454 "EHLO pentafluge.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754740AbXF3J1q (ORCPT ); Sat, 30 Jun 2007 05:27:46 -0400 Content-Disposition: inline In-Reply-To: <1bdef6b017f0ccb94ed76dbdd2b4cc676e5ef312.1183143820.git.bfields@citi.umich.edu> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Fri, Jun 29, 2007 at 03:21:29PM -0400, J. Bruce Fields wrote: > +static int gfs2_setlease(struct file *file, long arg, struct file_lock **fl) > +{ > + struct gfs2_sbd *sdp = GFS2_SB(file->f_mapping->host); > + int ret = -EOPNOTSUPP; > + > + if (sdp->sd_args.ar_localflocks) { > + return setlease(file, arg, fl); > + } > + > + /* For now fail the delegation request. Cluster file system can not > + allow any node in the cluster to get a local lease until it can > + be managed centrally by the cluster file system. > + */ > + return ret; > +} Very odd way to write this function. It should look more like: static int gfs2_setlease(struct file *file, long arg, struct file_lock **fl) { struct gfs2_sbd *sdp = GFS2_SB(file->f_mapping->host); int ret = -EOPNOTSUPP; /* * For now fail the delegation request. Cluster file system can not * allow any node in the cluster to get a local lease until it can * be managed centrally by the cluster file system. */ if (!sdp->sd_args.ar_localflocks) return -EOPNOTSUPP; return setlease(file, arg, fl); }