[lkml]   [2015]   [Feb]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 0/4] locks: flock and lease related bugfixes, and remove i_flctx counters
Ok, so having gone over these, I think 1, 2 and 4 are fine.

Let's just drop 3. The upgrade clearly does need to drop the old lock
when returning FILE_LOCK_DEFERRED, because otherwise two upgraders
will deadlock waiting for each other.

Oh, and in #1, you might want to remove the "FIXME: add counters to
struct file_lock_context so we don't need to do this?" although that
obviously makes it not strictly a 100% revert. I do believe that we
should add a "list_count()" function, so that we could write

*flock_count = list_count(&ctx->flc_flock);

instead of that horribly ugly

list_for_each_entry(lock, &ctx->flc_flock, fl_list)

thing. But that's a separate cleanup.

Can we get that truncated series tested with some flock test suite? I
assume there is *some* filesystem tester that tests some basic flock
stuff, even if it clearly didn't catch the race due to the unlock in
the middle..


 \ /
  Last update: 2015-02-17 21:21    [W:0.063 / U:0.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site