lkml.org 
[lkml]   [2014]   [Sep]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 14/17] locks: __break_lease cleanup in preparation of allowing direct removal of leases
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..


\
 
 \ /
  Last update: 2014-09-04 20:21    [W:2.151 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site