public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Dave Hansen <haveblue@us.ibm.com>
Cc: viro@ftp.linux.org.uk, hch@infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] r/o bind mounts: add vfsmount and superblock writer counts
Date: Tue, 9 Jan 2007 10:53:05 +0000	[thread overview]
Message-ID: <20070109105305.GA22984@infradead.org> (raw)
In-Reply-To: <20070108183445.9472D522@localhost.localdomain>

On Mon, Jan 08, 2007 at 10:34:45AM -0800, Dave Hansen wrote:
> Removing it had a few side-effects.  First of all, it made me move
> all of the operations on the counts of writers to underneath the
> spinlock that was already there.  I guess this could be a cause
> for potential contention because there _are_ locks in the common
> code paths now.  But, I do agree with Christoph that it would be
> awfully hard to get it contended.
> 
> The other side-effect is that we can't have the bit in mnt_flags
> to be a shortcut to the superblock's writeable state since we
> don't have a way to go find the mounts and that bit when a fs
> changes writeable state.  This causes a potential cache miss
> when we have to check the superblock directly during the
> relatively common __mnt_is_readonly() function.

Why? We _only_ need to check the vfsmount flag.  vfsmount can
become r/w if the superblock is marked r/o which means the
underlying (block/network/etc) device is fundamentally not writeable.


  reply	other threads:[~2007-01-09 10:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-08 18:34 [PATCH] r/o bind mounts: add vfsmount and superblock writer counts Dave Hansen
2007-01-09 10:53 ` Christoph Hellwig [this message]
2007-01-10 18:33   ` Dave Hansen

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=20070109105305.GA22984@infradead.org \
    --to=hch@infradead.org \
    --cc=haveblue@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@ftp.linux.org.uk \
    /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