linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hugh Dickins <hugh@veritas.com>
To: "Josef 'Jeff' Sipek" <jeffpc@josefsipek.net>
Cc: Erez Zadok <ezk@cs.sunysb.edu>,
	akpm@linux-foundation.org, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org, Al Viro <viro@zeniv.linux.org.uk>,
	hch@infradead.org
Subject: Re: fs_stack/eCryptfs: remove 3rd arg of copy_attr_all, add locking to copy_inode_size
Date: Thu, 3 Apr 2008 20:02:12 +0100 (BST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0804031951430.840@blonde.site> (raw)
In-Reply-To: <20080403182001.GB30189@josefsipek.net>

On Thu, 3 Apr 2008, Josef 'Jeff' Sipek wrote:
> On Wed, Apr 02, 2008 at 09:49:11PM -0400, Erez Zadok wrote:
> ...
> > +#if BITS_PER_LONG == 32 && defined(CONFIG_SMP)
> > +	spin_lock(&dst->i_lock);
> > +#endif
> 
> I think you need to check CONFIG_PREEMPT as well.

Don't i_size_read() and i_size_write() handle that case adequately
themselves with preempt_dis/enable?

If you mean it'd be better to have the preempt_dis/enable bracketing
around the i_size_read() along with the i_size_write(): well, could
do, but if lower i_size is changing underneath us in that way,
it can just as well change again a moment later, so no point.

The bit that worries me, that prevents me from saying Acked-by,
is that I'm unsure of the extent to which lower filesystems are
relying on i_mutex or something else for their i_size serialization.
Using the i_lock here plays well with unionfs internally, and fixes
the hangs I used to see; but relying on one locking scheme here and
another below is uncomfortable for me.  But it is an improvement.

Hugh

  reply	other threads:[~2008-04-03 19:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-03  1:49 fs_stack/eCryptfs: remove 3rd arg of copy_attr_all, add locking to copy_inode_size Erez Zadok
2008-04-03  2:26 ` Andrew Morton
2008-04-03 18:20 ` Josef 'Jeff' Sipek
2008-04-03 19:02   ` Hugh Dickins [this message]
2008-04-03 19:07   ` Erez Zadok
2008-04-03 19:26     ` Hugh Dickins
2008-04-03 19:31       ` Josef 'Jeff' Sipek

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=Pine.LNX.4.64.0804031951430.840@blonde.site \
    --to=hugh@veritas.com \
    --cc=akpm@linux-foundation.org \
    --cc=ezk@cs.sunysb.edu \
    --cc=hch@infradead.org \
    --cc=jeffpc@josefsipek.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.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;
as well as URLs for NNTP newsgroup(s).