All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Dave Chinner <david@fromorbit.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [git pull] vfs.git - including i_mutex wrappers
Date: Sun, 24 Jan 2016 07:48:50 +0000	[thread overview]
Message-ID: <20160124074850.GY17997@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20160124070406.GL6033@dastard>

On Sun, Jan 24, 2016 at 06:04:06PM +1100, Dave Chinner wrote:

> Hence even for ->setattr, we can remove the IOLOCK usage if the
> vfs takes the the new i_rwsem in exclusive mode because we would
> still have a functional IO submission barrier....
> 
> > For data operations on regular files it's probably up to filesystems, as
> > i_mutex is now.  Not sure if IOLOCK would map well on that; can you live with
> > that thing taken outside of transaction?
> 
> Yes. IOLOCK has the same scope as i_mutex in the IO path.

Umm...  So e.g. xfs_create() could take IOLOCK before xfs_trans_reserve()?
If so, you probably could eventually be able to use ->i_rwsem for it (and
drop it in places where it's already taken by method callers).  I'm nowhere
near being familiar enough with details of fs/xfs locking to tell how much
PITA would the last part be - e.g. a function used both inside ->lookup()
and in ->read_iter() and currently taking IOLOCK shared would need to
have it lifted into both callers and removed from ->lookup(), etc., which
might or might not be painful.

  reply	other threads:[~2016-01-24  7:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-23 14:58 [git pull] vfs.git - including i_mutex wrappers Al Viro
2016-01-23 22:34 ` Dave Chinner
2016-01-23 22:44   ` Dave Chinner
2016-01-23 23:09     ` Al Viro
2016-01-23 23:38       ` Al Viro
2016-01-24  0:53       ` Dave Chinner
2016-01-24  1:41         ` Al Viro
2016-01-24  7:04           ` Dave Chinner
2016-01-24  7:48             ` Al Viro [this message]
2016-01-23 23:48     ` Linus Torvalds
2016-01-24  0:26       ` Dave Chinner
2016-01-24  1:20         ` Al Viro
2016-01-24  7:17           ` Dave Chinner

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=20160124074850.GY17997@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=david@fromorbit.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /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.