All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Layton <jeff.layton@primarydata.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-fsdevel@vger.kernel.org, linux-nfs@vger.kernel.org,
	"J. Bruce Fields" <bfields@fieldses.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 14/17] locks: __break_lease cleanup in preparation of allowing direct removal of leases
Date: Fri, 5 Sep 2014 09:35:04 -0400	[thread overview]
Message-ID: <20140905093504.215b288f@tlielax.poochiereds.net> (raw)
In-Reply-To: <20140904180725.GA11232@infradead.org>

On Thu, 4 Sep 2014 11:07:25 -0700
Christoph Hellwig <hch@infradead.org> wrote:

> On Thu, Sep 04, 2014 at 08:38:40AM -0400, Jeff Layton wrote:
> > Eliminate an unneeded "flock" variable. We can use "fl" as a loop cursor
> > everywhere. Add a any_leases_conflict helper function as well to
> > consolidate a bit of code.
> 
> Looks good,
> 
> Reviewed-by: Christoph Hellwig <hch@lst.de>
> 
> One thing that came to mind after starring at this code for a while and
> then seeing your cleanup:
> 
> the sleep/wake patterns in __break_lease seem highly suboptimal, as
> we always wait for the break time on the first least found, why
> don't we simply take the max of the lease break times, and wait for
> that?
> 
> I guess the case of lots of read leases just isn't common enough to
> bother..

That would make more sense. I've no objection to changing it to do that
though it's probably outside the scope of this patchset.

-- 
Jeff Layton <jlayton@primarydata.com>

WARNING: multiple messages have this Message-ID (diff)
From: Jeff Layton <jeff.layton-7I+n7zu2hftEKMMhf/gKZA@public.gmane.org>
To: Christoph Hellwig <hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
Cc: linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	"J. Bruce Fields"
	<bfields-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org>,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v2 14/17] locks: __break_lease cleanup in preparation of allowing direct removal of leases
Date: Fri, 5 Sep 2014 09:35:04 -0400	[thread overview]
Message-ID: <20140905093504.215b288f@tlielax.poochiereds.net> (raw)
In-Reply-To: <20140904180725.GA11232-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>

On Thu, 4 Sep 2014 11:07:25 -0700
Christoph Hellwig <hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org> wrote:

> On Thu, Sep 04, 2014 at 08:38:40AM -0400, Jeff Layton wrote:
> > Eliminate an unneeded "flock" variable. We can use "fl" as a loop cursor
> > everywhere. Add a any_leases_conflict helper function as well to
> > consolidate a bit of code.
> 
> Looks good,
> 
> Reviewed-by: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>
> 
> One thing that came to mind after starring at this code for a while and
> then seeing your cleanup:
> 
> the sleep/wake patterns in __break_lease seem highly suboptimal, as
> we always wait for the break time on the first least found, why
> don't we simply take the max of the lease break times, and wait for
> that?
> 
> I guess the case of lots of read leases just isn't common enough to
> bother..

That would make more sense. I've no objection to changing it to do that
though it's probably outside the scope of this patchset.

-- 
Jeff Layton <jlayton-7I+n7zu2hftEKMMhf/gKZA@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2014-09-05 13:35 UTC|newest]

Thread overview: 83+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-04 12:38 [PATCH v2 00/17] locks: internal lease API overhaul Jeff Layton
2014-09-04 12:38 ` [PATCH v2 01/17] locks: consolidate "nolease" routines Jeff Layton
2014-09-04 12:38   ` [Cluster-devel] " Jeff Layton
2014-09-04 12:38   ` Jeff Layton
2014-09-04 12:41   ` Trond Myklebust
2014-09-04 12:41     ` [Cluster-devel] " Trond Myklebust
2014-09-04 12:41     ` Trond Myklebust
2014-09-04 12:49     ` Jeff Layton
2014-09-04 12:49       ` [Cluster-devel] " Jeff Layton
2014-09-04 12:49       ` Jeff Layton
2014-09-04 18:25       ` Trond Myklebust
2014-09-04 18:25         ` [Cluster-devel] " Trond Myklebust
2014-09-04 20:12         ` Christoph Hellwig
2014-09-04 20:12           ` [Cluster-devel] " Christoph Hellwig
2014-09-05 11:48           ` Jeff Layton
2014-09-05 11:48             ` [Cluster-devel] " Jeff Layton
2014-09-05 11:48             ` Jeff Layton
2014-09-04 17:46   ` Christoph Hellwig
2014-09-04 17:46     ` [Cluster-devel] " Christoph Hellwig
2014-09-04 17:46     ` Christoph Hellwig
2014-09-04 12:38 ` [PATCH v2 02/17] security: make security_file_set_fowner, f_setown and __f_setown void return Jeff Layton
2014-09-04 17:47   ` Christoph Hellwig
2014-10-07 17:11   ` Dmitry Kasatkin
2014-10-07 17:17     ` Christoph Hellwig
2014-10-07 17:34       ` Dmitry Kasatkin
2014-10-07 17:34         ` Dmitry Kasatkin
2014-10-07 18:02         ` Jeff Layton
2014-09-04 12:38 ` [PATCH v2 03/17] locks: close potential race in lease_get_mtime Jeff Layton
2014-09-04 12:38 ` [PATCH v2 04/17] nfsd: fix potential lease memory leak in nfs4_setlease Jeff Layton
2014-09-04 12:38 ` [PATCH v2 05/17] locks: generic_delete_lease doesn't need a file_lock at all Jeff Layton
2014-09-04 20:14   ` Christoph Hellwig
2014-09-04 20:14     ` Christoph Hellwig
2014-09-05  0:29     ` Jeff Layton
2014-09-05  0:29       ` Jeff Layton
2015-01-12 23:03   ` NeilBrown
2015-01-12 23:03     ` NeilBrown
2015-01-12 23:25     ` Jeff Layton
2015-01-13  2:14       ` NeilBrown
2015-01-13  2:14         ` NeilBrown
2014-09-04 12:38 ` [PATCH v2 06/17] locks: clean up vfs_setlease kerneldoc comments Jeff Layton
2014-09-04 12:38 ` [PATCH v2 07/17] nfsd: don't keep a pointer to the lease in nfs4_file Jeff Layton
2014-09-05 21:40   ` J. Bruce Fields
2014-09-05 21:40     ` J. Bruce Fields
2014-09-06 12:33     ` Jeff Layton
2014-09-06 12:33       ` Jeff Layton
2014-09-04 12:38 ` [PATCH v2 08/17] locks: plumb a "priv" pointer into the setlease routines Jeff Layton
2014-09-04 17:48   ` Christoph Hellwig
2014-09-04 12:38 ` [PATCH v2 09/17] locks: define a lm_setup handler for leases Jeff Layton
2014-09-04 12:38   ` Jeff Layton
2014-09-04 17:49   ` Christoph Hellwig
2014-09-04 17:49     ` Christoph Hellwig
2014-09-04 12:38 ` [PATCH v2 10/17] locks: move i_lock acquisition into generic_*_lease handlers Jeff Layton
2014-09-04 12:38 ` [PATCH v2 11/17] locks: move freeing of leases outside of i_lock Jeff Layton
2014-09-04 17:50   ` Christoph Hellwig
2014-09-04 17:50     ` Christoph Hellwig
2014-09-05 14:03     ` Jeff Layton
2014-09-04 12:38 ` [PATCH v2 12/17] locks: update Documentation/filesystems with new setlease semantics Jeff Layton
2014-09-04 17:50   ` Christoph Hellwig
2014-09-04 17:50     ` Christoph Hellwig
2014-09-05 14:02     ` Jeff Layton
2014-09-05 14:02       ` Jeff Layton
2014-09-04 12:38 ` [PATCH v2 13/17] locks: remove i_have_this_lease check from __break_lease Jeff Layton
2014-09-04 12:38   ` Jeff Layton
2014-09-04 17:51   ` Christoph Hellwig
2014-09-04 17:51     ` Christoph Hellwig
2014-09-04 18:03     ` Jeff Layton
2014-09-04 18:03       ` Jeff Layton
2014-09-04 12:38 ` [PATCH v2 14/17] locks: __break_lease cleanup in preparation of allowing direct removal of leases Jeff Layton
2014-09-04 18:07   ` Christoph Hellwig
2014-09-04 18:07     ` Christoph Hellwig
2014-09-05 13:35     ` Jeff Layton [this message]
2014-09-05 13:35       ` Jeff Layton
2014-09-04 12:38 ` [PATCH v2 15/17] locks: give lm_break a return value Jeff Layton
2014-09-04 12:38   ` Jeff Layton
2014-09-04 18:08   ` Christoph Hellwig
2014-09-04 18:08     ` Christoph Hellwig
2014-09-04 12:38 ` [PATCH v2 16/17] locks: set fl_owner for leases to filp instead of current->files Jeff Layton
2014-09-04 12:38   ` Jeff Layton
2014-09-04 12:38 ` [PATCH v2 17/17] locks: clean up comments over fl_owner_t definition Jeff Layton
2014-09-04 17:53   ` Christoph Hellwig
2014-09-04 17:53     ` Christoph Hellwig
2014-09-05 13:36     ` Jeff Layton
2014-09-05 13:36       ` Jeff Layton

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=20140905093504.215b288f@tlielax.poochiereds.net \
    --to=jeff.layton@primarydata.com \
    --cc=bfields@fieldses.org \
    --cc=hch@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.