2009-11-02 17:11:55

by Jan Blunck

[permalink] [raw]
Subject: Re: [PATCH 01/27] BKL: Push down BKL from do_new_mount() to the filesystems get_sb/fill_super operation

On Mon, Nov 02, Jan Blunck wrote:

> I've read through all the code formerly covered by the BKL inside
> do_kern_mount() and have satisfied myself that it doesn't need the BKL
> any more.
>
> do_kern_mount() is already called without the BKL when mounting the rootfs
> and in nfsctl. do_kern_mount() calls vfs_kern_mount(), which is called
> from various places without BKL: simple_pin_fs(), nfs_do_clone_mount()
> through nfs_follow_mountpoint(), afs_mntpt_do_automount() through
> afs_mntpt_follow_link(). Both later functions are actually the filesystems
> follow_link inode operation. vfs_kern_mount() is calling the specified
> get_sb function and lets the filesystem do its job by calling the given
> fill_super function.
>
> Therefore I think it is safe to push down the BKL from the VFS to the
> low-level filesystems get_sb/fill_super operation.
>
> Signed-off-by: Jan Blunck <[email protected]>
> Cc: Matthew Wilcox <[email protected]>

Attached is a new version of the patch that includes the changes for
filesystems outside of fs/ directory as well. Besides that I trimmed the CC
list this time.

Cheers,
Jan


Attachments:
(No filename) (1.09 kB)
0001-BKL-Push-down-BKL-from-do_new_mount-to-the-filesyste.patch (80.59 kB)
Download all attachments

2009-11-03 10:12:12

by Christoph Hellwig

[permalink] [raw]
Subject: Re: [PATCH 01/27] BKL: Push down BKL from do_new_mount() to the filesystems get_sb/fill_super operation

On Mon, Nov 02, 2009 at 06:11:47PM +0100, Jan Blunck wrote:
> Attached is a new version of the patch that includes the changes for
> filesystems outside of fs/ directory as well. Besides that I trimmed the CC
> list this time.

For the next spin please don't push it down to filesystems that
obviously don't need it at all and just mention them in the patch
description. For filesystems like xfs and btrfs that never used the BKL
at all that should make life a bit simpler.

2009-11-03 10:25:08

by Jan Blunck

[permalink] [raw]
Subject: Re: [PATCH 01/27] BKL: Push down BKL from do_new_mount() to the filesystems get_sb/fill_super operation

On Tue, Nov 03, Christoph Hellwig wrote:

> On Mon, Nov 02, 2009 at 06:11:47PM +0100, Jan Blunck wrote:
> > Attached is a new version of the patch that includes the changes for
> > filesystems outside of fs/ directory as well. Besides that I trimmed the CC
> > list this time.
>
> For the next spin please don't push it down to filesystems that
> obviously don't need it at all and just mention them in the patch
> description. For filesystems like xfs and btrfs that never used the BKL
> at all that should make life a bit simpler.

My plan was to remove the BKL in the obvious cases in the followup patches
that are also included in the series. So should I just merge the obvious stuff
into one patch? Christian Borntraeger was actually requesting the opposite. He
wants to be able to bisect it to the patch that is removing the BKL. That
would be much simple with many small patches I think.

Regards,
Jan

--
Jan Blunck <[email protected]>

2009-11-03 14:33:34

by Christoph Hellwig

[permalink] [raw]
Subject: Re: [PATCH 01/27] BKL: Push down BKL from do_new_mount() to the filesystems get_sb/fill_super operation

On Tue, Nov 03, 2009 at 11:25:09AM +0100, Jan Blunck wrote:
> > For the next spin please don't push it down to filesystems that
> > obviously don't need it at all and just mention them in the patch
> > description. For filesystems like xfs and btrfs that never used the BKL
> > at all that should make life a bit simpler.
>
> My plan was to remove the BKL in the obvious cases in the followup patches
> that are also included in the series. So should I just merge the obvious stuff
> into one patch? Christian Borntraeger was actually requesting the opposite. He
> wants to be able to bisect it to the patch that is removing the BKL. That
> would be much simple with many small patches I think.

Yes, but for most filesystems the BKL never made sense. Anywhere where
it's non-obvious (or the maintainer wants it) make it a separate patch,
but don't bother for things like xfs or btrfs.

2009-11-03 14:47:09

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [PATCH 01/27] BKL: Push down BKL from do_new_mount() to the filesystems get_sb/fill_super operation

On Tuesday 03 November 2009, Christoph Hellwig wrote:
> On Tue, Nov 03, 2009 at 11:25:09AM +0100, Jan Blunck wrote:
> >
> > My plan was to remove the BKL in the obvious cases in the followup patches
> > that are also included in the series. So should I just merge the obvious stuff
> > into one patch? Christian Borntraeger was actually requesting the opposite. He
> > wants to be able to bisect it to the patch that is removing the BKL. That
> > would be much simple with many small patches I think.
>
> Yes, but for most filesystems the BKL never made sense. Anywhere where
> it's non-obvious (or the maintainer wants it) make it a separate patch,
> but don't bother for things like xfs or btrfs.
>

In order to maintain bisectability, you could first add the explicit BKL
in the file systems where it may be needed and then remove it from the
common code in the final patch, listing all file systems by category
(doesn't need BKL, holds BKL itself) that you looked at.

Shorter series, but same results because of the recursive nature of
the BKL.

Arnd <><