Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1315840

Re: [git pull] vfs.git - including i_mutex wrappers

From Al Viro <viro@ZenIV.linux.org.uk>
Newsgroups linux.kernel
Subject Re: [git pull] vfs.git - including i_mutex wrappers
Date 2016-01-24 08:50 +0100
Message-ID <qUnAS-1x3-3@gated-at.bofh.it> (permalink)
References (2 earlier) <qUfah-405-15@gated-at.bofh.it> <qUfDj-4rj-3@gated-at.bofh.it> <qUhc6-5lj-7@gated-at.bofh.it> <qUhYt-5To-3@gated-at.bofh.it> <qUmY9-1gU-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[git pull] vfs.git - including i_mutex wrappers Al Viro <viro@ZenIV.linux.org.uk> - 2016-01-23 16:00 +0100
  Re: [git pull] vfs.git - including i_mutex wrappers Dave Chinner <david@fromorbit.com> - 2016-01-23 23:40 +0100
    Re: [git pull] vfs.git - including i_mutex wrappers Dave Chinner <david@fromorbit.com> - 2016-01-23 23:50 +0100
      Re: [git pull] vfs.git - including i_mutex wrappers Al Viro <viro@ZenIV.linux.org.uk> - 2016-01-24 00:20 +0100
        Re: [git pull] vfs.git - including i_mutex wrappers Al Viro <viro@ZenIV.linux.org.uk> - 2016-01-24 00:40 +0100
        Re: [git pull] vfs.git - including i_mutex wrappers Dave Chinner <david@fromorbit.com> - 2016-01-24 02:00 +0100
          Re: [git pull] vfs.git - including i_mutex wrappers Al Viro <viro@ZenIV.linux.org.uk> - 2016-01-24 02:50 +0100
            Re: [git pull] vfs.git - including i_mutex wrappers Dave Chinner <david@fromorbit.com> - 2016-01-24 08:10 +0100
              Re: [git pull] vfs.git - including i_mutex wrappers Al Viro <viro@ZenIV.linux.org.uk> - 2016-01-24 08:50 +0100
      Re: [git pull] vfs.git - including i_mutex wrappers Linus Torvalds <torvalds@linux-foundation.org> - 2016-01-24 00:50 +0100
        Re: [git pull] vfs.git - including i_mutex wrappers Dave Chinner <david@fromorbit.com> - 2016-01-24 01:30 +0100
          Re: [git pull] vfs.git - including i_mutex wrappers Al Viro <viro@ZenIV.linux.org.uk> - 2016-01-24 02:30 +0100
            Re: [git pull] vfs.git - including i_mutex wrappers Dave Chinner <david@fromorbit.com> - 2016-01-24 08:20 +0100

csiph-web