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


Groups > linux.kernel > #1245966

Re: [PATCH 2/2] ext2: Add locking for DAX faults

From Ross Zwisler <ross.zwisler@linux.intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH 2/2] ext2: Add locking for DAX faults
Date 2015-10-13 19:40 +0200
Message-ID <qjbIm-53L-17@gated-at.bofh.it> (permalink)
References <qhO1r-6GT-13@gated-at.bofh.it> <qhO1s-6GT-19@gated-at.bofh.it> <qiy4h-6cW-11@gated-at.bofh.it> <qiT8K-37K-13@gated-at.bofh.it> <qj2OL-A2-41@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Oct 13, 2015 at 10:07:12AM +0200, Jan Kara wrote:
> On Mon 12-10-15 15:41:35, Ross Zwisler wrote:
> > On Mon, Oct 12, 2015 at 10:14:43AM +1100, Dave Chinner wrote:
> > > On Fri, Oct 09, 2015 at 04:02:08PM -0600, Ross Zwisler wrote:
> > > > Add locking to ensure that DAX faults are isolated from ext2 operations
> > > > that modify the data blocks allocation for an inode.  This is intended to
> > > > be analogous to the work being done in XFS by Dave Chinner:
> > > > 
> > > > http://www.spinics.net/lists/linux-fsdevel/msg90260.html
> > > > 
> > > > Compared with XFS the ext2 case is greatly simplified by the fact that ext2
> > > > already allocates and zeros new blocks before they are returned as part of
> > > > ext2_get_block(), so DAX doesn't need to worry about getting unmapped or
> > > > unwritten buffer heads.
> > > > 
> > > > This means that the only work we need to do in ext2 is to isolate the DAX
> > > > faults from inode block allocation changes.  I believe this just means that
> > > > we need to isolate the DAX faults from truncate operations.
> > > 
> > > Why limit this just to DAX page faults?
> > 
> > Yep, I see that XFS uses the same locking to protect both DAX and non-DAX
> > faults.  I'll add this protection to non-DAX ext2 faults as well.
> 
> Actually, since ext2 driver doesn't support punch hole, there is no need
> for additional locking in non-DAX paths. So we can save some space in inode
> and locking for that common case. So I'd prefer if we didn't add
> unnecessary locking in those paths and just document that for non-DAX
> faults using page lock and i_size check is enough. After all the main
> usecase of ext2 driver these days is for people with tiny devices...

Based on this comment I'm assuming you'd like the definition of dax_sem in
struct ext2_inode_info to be conditional like ext2_inode_info->xattr_sem,
correct?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

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


Thread

[PATCH 0/2] Add updated DAX locking to ext2 Ross Zwisler <ross.zwisler@linux.intel.com> - 2015-10-10 00:10 +0200
  [PATCH 2/2] ext2: Add locking for DAX faults Ross Zwisler <ross.zwisler@linux.intel.com> - 2015-10-10 00:10 +0200
    Re: [PATCH 2/2] ext2: Add locking for DAX faults Dan Williams <dan.j.williams@intel.com> - 2015-10-10 00:20 +0200
      Re: [PATCH 2/2] ext2: Add locking for DAX faults Ross Zwisler <ross.zwisler@linux.intel.com> - 2015-10-10 00:40 +0200
    Re: [PATCH 2/2] ext2: Add locking for DAX faults Dave Chinner <david@fromorbit.com> - 2015-10-12 01:20 +0200
      Re: [PATCH 2/2] ext2: Add locking for DAX faults Ross Zwisler <ross.zwisler@linux.intel.com> - 2015-10-12 19:30 +0200
        Re: [PATCH 2/2] ext2: Add locking for DAX faults Dave Chinner <david@fromorbit.com> - 2015-10-13 01:10 +0200
      Re: [PATCH 2/2] ext2: Add locking for DAX faults Ross Zwisler <ross.zwisler@linux.intel.com> - 2015-10-12 23:50 +0200
        Re: [PATCH 2/2] ext2: Add locking for DAX faults Dave Chinner <david@fromorbit.com> - 2015-10-13 01:30 +0200
          Re: [PATCH 2/2] ext2: Add locking for DAX faults Eric Curtin <ericcurtin17@gmail.com> - 2015-10-13 01:40 +0200
            Re: [PATCH 2/2] ext2: Add locking for DAX faults Ross Zwisler <ross.zwisler@linux.intel.com> - 2015-10-14 00:20 +0200
          Re: [PATCH 2/2] ext2: Add locking for DAX faults Ross Zwisler <ross.zwisler@linux.intel.com> - 2015-10-13 17:10 +0200
        Re: [PATCH 2/2] ext2: Add locking for DAX faults Jan Kara <jack@suse.cz> - 2015-10-13 10:10 +0200
          Re: [PATCH 2/2] ext2: Add locking for DAX faults Ross Zwisler <ross.zwisler@linux.intel.com> - 2015-10-13 19:40 +0200
            Re: [PATCH 2/2] ext2: Add locking for DAX faults Jan Kara <jack@suse.cz> - 2015-10-13 19:50 +0200

csiph-web