From: Arnd Bergmann <arnd@arndb.de>
To: Sage Weil <sage@newdream.net>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
Matthew Wilcox <willy@linux.intel.com>,
Christoph Hellwig <hch@lst.de>,
"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>,
gregf@hq.newdream.net
Subject: Re: [PATCH] Remove BKL from fs/locks.c
Date: Wed, 15 Sep 2010 19:17:25 +0200 [thread overview]
Message-ID: <201009151917.25589.arnd@arndb.de> (raw)
In-Reply-To: <Pine.LNX.4.64.1009150948190.24081@cobra.newdream.net>
On Wednesday 15 September 2010, Sage Weil wrote:
> > @@ -2362,7 +2362,7 @@ static int encode_caps_cb(struct inode *inode, struct ceph_cap *cap,
> > if (recon_state->flock) {
> > int num_fcntl_locks, num_flock_locks;
> >
> > - lock_kernel();
> > + lock_flocks();
> > ceph_count_locks(inode, &num_fcntl_locks, &num_flock_locks);
> > rec.v2.flock_len = (2*sizeof(u32) +
> > (num_fcntl_locks+num_flock_locks) *
> > @@ -2373,7 +2373,7 @@ static int encode_caps_cb(struct inode *inode, struct ceph_cap *cap,
> > err = ceph_encode_locks(inode, pagelist,
> > num_fcntl_locks,
> > num_flock_locks);
> > - unlock_kernel();
> > + unlock_flocks();
> > }
>
> The Ceph code won't currently behave with lock_flocks() taking a spinlock.
> We're preparing a patch to fix that now. As long as there is a window
> between lock_flocks() being defined and the spinlock conversion, I can
> send the fix upstream then and avoid any breakage. Or send the patches
> your way to include in your tree, whatever you prefer!
I'd be happy to just integrate the fix in this patch, or as a separate patch
in the series.
I certainly don't want to break any file system in the middle of the series,
I'm sure we can find a way to do it right.
What is the problem? I just saw ceph_pagelist_addpage potentially sleeping,
is that what you are thinking of?
> > +void unlock_flocks(void)
> > +{
> > + unlock_kernel();
> > +}
>
> EXPORT_SYMBOL(unlock_flocks); ?
Right, thanks!
Arnd
next prev parent reply other threads:[~2010-09-15 17:17 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
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 [this message]
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=201009151917.25589.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=Trond.Myklebust@netapp.com \
--cc=akpm@linux-foundation.org \
--cc=bfields@fieldses.org \
--cc=fweisbec@gmail.com \
--cc=gregf@hq.newdream.net \
--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=sage@newdream.net \
--cc=sfr@canb.auug.org.au \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox