From: Linus Torvalds <torvalds@linux-foundation.org>
To: Jeff Layton <jeff.layton@primarydata.com>
Cc: linux-fsdevel <linux-fsdevel@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
"Kirill A. Shutemov" <kirill@shutemov.name>,
"J. Bruce Fields" <bfields@fieldses.org>,
Christoph Hellwig <hch@lst.de>,
Dave Chinner <david@fromorbit.com>,
Sasha Levin <sasha.levin@oracle.com>
Subject: Re: [PATCH 0/4] locks: flock and lease related bugfixes, and remove i_flctx counters
Date: Tue, 17 Feb 2015 11:55:01 -0800 [thread overview]
Message-ID: <CA+55aFwdAg_St3_qJPSHfityE7772taoPKwSg1M3B0WiBWnCsA@mail.gmail.com> (raw)
In-Reply-To: <1424177190-14252-1-git-send-email-jeff.layton@primarydata.com>
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)
++(*flock_count);
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..
Linus
next prev parent reply other threads:[~2015-02-17 19:55 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-17 12:46 [PATCH 0/4] locks: flock and lease related bugfixes, and remove i_flctx counters Jeff Layton
2015-02-17 12:46 ` [PATCH 1/4] Revert "locks: keep a count of locks on the flctx lists" Jeff Layton
2015-02-17 12:46 ` [PATCH 2/4] locks: remove conditional lock release in middle of flock_lock_file Jeff Layton
2015-02-17 17:10 ` J. Bruce Fields
2015-02-17 17:56 ` Jeff Layton
2015-02-17 19:11 ` J. Bruce Fields
2015-02-17 22:21 ` J. Bruce Fields
2015-02-17 22:29 ` Jeff Layton
2015-02-17 12:46 ` [PATCH 3/4] locks: when upgrading, don't remove old flock lock until replacing with new one Jeff Layton
2015-02-17 12:46 ` [PATCH 4/4] locks: only remove leases associated with the file being closed Jeff Layton
2015-02-17 19:55 ` Linus Torvalds [this message]
2015-02-17 20:20 ` [PATCH 0/4] locks: flock and lease related bugfixes, and remove i_flctx counters Linus Torvalds
2015-02-17 20:20 ` Al Viro
2015-02-17 21:10 ` 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=CA+55aFwdAg_St3_qJPSHfityE7772taoPKwSg1M3B0WiBWnCsA@mail.gmail.com \
--to=torvalds@linux-foundation.org \
--cc=bfields@fieldses.org \
--cc=david@fromorbit.com \
--cc=hch@lst.de \
--cc=jeff.layton@primarydata.com \
--cc=kirill@shutemov.name \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sasha.levin@oracle.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).