All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@debian.org>
To: Paul Menage <pmenage@ensim.com>
Cc: viro@math.psu.edu, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Shift BKL into ->statfs()
Date: Wed, 3 Jul 2002 03:57:44 +0100	[thread overview]
Message-ID: <20020703035744.K27706@parcelfarce.linux.theplanet.co.uk> (raw)
In-Reply-To: <E17PYtv-0004Fd-00@pmenage-dt.ensim.com>; from pmenage@ensim.com on Tue, Jul 02, 2002 at 06:25:47PM -0700

On Tue, Jul 02, 2002 at 06:25:47PM -0700, Paul Menage wrote:
> This patch removes BKL protection from the invocation of the
> super_operations ->statfs() method, and shifts it into the filesystems
> where necessary. Any out-of-tree filesystems may need to take the BKL in
> their statfs() methods if they were relying on it for synchronisation.

Sure, makes sense to do.  For real credit though, let's see how much we
need the BKL.  In ext2's statfs, we reference:

sbi->s_groups_count (not modified)
sbi->s_itb_per_group (not modified)
sbi->s_es->s_first_data_block (not modified)
sbi->s_es->s_blocks_count (not modified)
sbi->s_es->s_free_blocks_count (lock_super)
sbi->s_es->s_r_blocks_count (not modified)
sbi->s_es->s_inodes_count (not modified)
sbi->s_es->s_free_inodes_count (lock_super)
sb->s_blocksize (modified many places ... but we all know you don't do it
	to a mounted fs).
sb->s_mount_opt (NOT LOCKED)

s_mount_opt doesn't actually need to be locked due to how it is
modified & used.  So it _looks_ like we only need to lock_super(sb); /
unlock_super(sb); in ext2.  Anyone more familiar with ext2 locking care
to comment?

I bet most other filesystems can handle lock_super / unlock_super
for themselves.  See if some kerneljanitors are willing to help audit,
perhaps?

-- 
Revolutions do not require corporate support.

  reply	other threads:[~2002-07-03  2:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-03  1:25 [PATCH] Shift BKL into ->statfs() Paul Menage
2002-07-03  2:57 ` Matthew Wilcox [this message]
2002-07-03  3:04   ` Paul Menage
2002-07-03  6:07   ` Alexander Viro
2002-07-03  6:25 ` Alexander Viro
2002-07-03  7:57   ` Paul Menage
2002-07-03 12:28     ` Matthew Wilcox
2002-07-03 12:28     ` Matthew Wilcox
2002-07-03  9:55   ` Oleg Drokin
2002-07-03 10:34   ` Anton Altaparmakov

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=20020703035744.K27706@parcelfarce.linux.theplanet.co.uk \
    --to=willy@debian.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmenage@ensim.com \
    --cc=viro@math.psu.edu \
    /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.