From: "J. Bruce Fields" <bfields@fieldses.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-fsdevel@vger.kernel.org, Marc Eshel <eshel@almaden.ibm.com>,
Steven Whitehouse <swhiteho@redhat.com>
Subject: Re: [PATCH 5/6] gfs2: stop giving out non-cluster-coherent leases
Date: Wed, 4 Jul 2007 17:48:02 -0400 [thread overview]
Message-ID: <20070704214802.GD26764@fieldses.org> (raw)
In-Reply-To: <20070630092742.GF22050@infradead.org>
On Sat, Jun 30, 2007 at 10:27:42AM +0100, Christoph Hellwig wrote:
> 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:
Agreed; I've reversed the sense of the test, as suggested, and got rid
of the superfluous local "ret".
--b.
> 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);
> }
>
next prev parent reply other threads:[~2007-07-04 21:48 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-29 19:21 vfs lease api J. Bruce Fields
[not found] ` <6e0beaf3e950494a6903571f0b5c9b61fc7bf650.1183143819.git.bfields@citi.umich.edu>
2007-06-29 19:21 ` [PATCH 1/6] locks: share more common lease code J. Bruce Fields
[not found] ` <59343fe9a0b0bdb9c39ed217185b9c0d6c7d8dae.1183143819.git.bfields@citi.umich.edu>
2007-06-29 19:21 ` [PATCH 2/6] locks: provide a file lease method enabling cluster-coherent leases J. Bruce Fields
2007-06-30 9:26 ` Christoph Hellwig
[not found] ` <1bdef6b017f0ccb94ed76dbdd2b4cc676e5ef312.1183143820.git.bfields@citi.umich.edu>
2007-06-29 19:21 ` [PATCH 5/6] gfs2: stop giving out non-cluster-coherent leases J. Bruce Fields
2007-06-30 9:27 ` Christoph Hellwig
2007-07-01 15:00 ` J. Bruce Fields
2007-07-04 21:48 ` J. Bruce Fields [this message]
[not found] ` <ce5021881e67029f0e3d6f24109cf2953a0edcd1.1183143820.git.bfields@citi.umich.edu>
2007-06-29 19:21 ` [PATCH 6/6] nfs: disable leases over NFS J. Bruce Fields
2007-06-29 21:16 ` Peter Staubach
2007-06-29 21:39 ` J. Bruce Fields
2007-06-29 22:30 ` Steven Whitehouse
2007-06-29 22:21 ` J. Bruce Fields
2007-06-30 9:25 ` Christoph Hellwig
2007-07-04 23:22 ` J. Bruce Fields
2007-07-05 15:41 ` J. Bruce Fields
2007-07-11 10:20 ` Christoph Hellwig
2007-07-11 23:10 ` J. Bruce Fields
2007-06-30 9:20 ` [PATCH 1/6] locks: share more common lease code Christoph Hellwig
2007-07-03 22:17 ` J. Bruce Fields
2007-07-04 8:26 ` Christoph Hellwig
[not found] ` <dc828b771d2a4b78d59bdbe3c583b81887205cab.1183143820.git.bfields@citi.umich.edu>
2007-06-29 19:21 ` [PATCH 3/6] locks: rename lease functions to reflect locks.c conventions J. Bruce Fields
2007-06-30 9:22 ` Christoph Hellwig
2007-07-04 21:42 ` J. Bruce Fields
[not found] ` <b057dca3f8acb125eccdce3a3b84ff04713fea7c.1183143820.git.bfields@citi.umich.edu>
2007-06-29 19:21 ` [PATCH 4/6] locks: fix locks.c lease symbol exports J. Bruce Fields
2007-06-30 9:23 ` Christoph Hellwig
2007-07-04 21:42 ` J. Bruce Fields
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070704214802.GD26764@fieldses.org \
--to=bfields@fieldses.org \
--cc=akpm@linux-foundation.org \
--cc=eshel@almaden.ibm.com \
--cc=hch@infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=swhiteho@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).