All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	Matthew Wilcox <willy@linux.intel.com>,
	Christoph Hellwig <hch@lst.de>,
	Trond Myklebust <trond.myklebust@fys.uio.no>,
	"J. Bruce Fields" <bfields@fieldses.org>,
	Miklos Szeredi <mszeredi@suse.cz>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Ingo Molnar <mingo@redhat.com>, John Kacur <jkacur@redhat.com>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	Andrew Morton <akpm@linux-foundation.org>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH] Remove BKL from fs/locks.c
Date: Tue, 14 Sep 2010 22:39:02 +0200	[thread overview]
Message-ID: <201009142239.02904.arnd@arndb.de> (raw)
In-Reply-To: <AANLkTimzFDdWbr2gtfmJmfGJVnyURcpvwnGf334ZHVYc@mail.gmail.com>

On Tuesday 14 September 2010 22:20:22 Linus Torvalds wrote:
> End result: anybody who uses the old exports will just not link at
> all, and all in-kernel users (ie lockd etc) will now very explicitly
> have that xyz_bkl() use.
> 
> After that one release, we can re-introduce the old names without the
> bkl, and let filesystems and other subsystems just decide that they
> don't want the bkl version one by one. So that first phase would be
> basically a no-op with an interface rename just so that the rest could
> then be done piece-meal.

Hmm, maybe I'm misunderstanding part of that plan, but I think it
won't work because the BKL in there seems to protect all struct file_lock
instances and they are passed around to other code, most importantly
lockd. The file_locks themselves can be accessed both using sys_flock()
etc locally and using afs/nfs/coda/... exported file systems from other
systems.

AFAICT we could end up with lockd changing data under BKL while a sys_flock()
accesses the same data under file_lock_lock, with no mutual exclusion
between the two.

	Arnd

  reply	other threads:[~2010-09-14 20:40 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-14 20:06 [PATCH] Remove BKL from fs/locks.c Arnd Bergmann
2010-09-14 20:20 ` Linus Torvalds
2010-09-14 20:39   ` Arnd Bergmann [this message]
2010-09-14 20:53     ` Linus Torvalds
2010-09-14 21:24       ` Arnd Bergmann
2010-09-14 21:55         ` Trond Myklebust
2010-09-15 16:30           ` Arnd Bergmann
2010-09-15 17:02             ` Sage Weil
2010-09-15 17:17               ` Arnd Bergmann
2010-09-15 18:22                 ` Sage Weil
2010-09-15 20:42           ` J. Bruce Fields
2010-09-16  8:28             ` Arnd Bergmann
2010-09-16 14:10               ` 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=201009142239.02904.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=akpm@linux-foundation.org \
    --cc=bfields@fieldses.org \
    --cc=fweisbec@gmail.com \
    --cc=hch@lst.de \
    --cc=jkacur@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=mszeredi@suse.cz \
    --cc=sfr@canb.auug.org.au \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=trond.myklebust@fys.uio.no \
    --cc=willy@linux.intel.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 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.