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


Groups > linux.kernel > #1501405

Re: [RFC PATCH-tip v4 02/10] locking/rwsem: Stop active read lock ASAP

From Christoph Hellwig <hch@infradead.org>
Newsgroups linux.kernel
Subject Re: [RFC PATCH-tip v4 02/10] locking/rwsem: Stop active read lock ASAP
Date 2016-10-16 08:00 +0200
Message-ID <ssMEh-1F5-7@gated-at.bofh.it> (permalink)
References (3 earlier) <spoI9-6CY-7@gated-at.bofh.it> <sqo3o-5Tb-15@gated-at.bofh.it> <sqBWF-65e-11@gated-at.bofh.it> <sqFQD-8tb-75@gated-at.bofh.it> <srctb-3jq-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Oct 12, 2016 at 08:06:40AM +1100, Dave Chinner wrote:
> Um, I seem to have completely missed that change - when did that
> happen and why?
> 
> Oh, it was part of the misguided "enable DAX on block devices"
> changes -

o, that commit just switched it to use ->f_mapping:

-       return (filp->f_flags & O_DIRECT) || IS_DAX(file_inode(filp));
+       return (filp->f_flags & O_DIRECT) || IS_DAX(filp->f_mapping->host);

The original version of it goes all the way back to introducing the
current-day DAX code in d475c6346 ("dax,ext2: replace XIP read and write
with DAX I/O");

> Hence I'd suggest that DAX check in io_is_direct() should be removed
> ASAP; the filesystems don't need it as they check the inode DAX
> state directly, and the code it "fixed" is no longer in the tree.

As long as ext4 still uses the overloaded direct_IO we need the
checks for DAX in the filemap.c generic read/write code.  It seems
like that's only two spots anyway, but I'd feel much safer once ext4
is switched over to the iomap version of the dax code.

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


Thread

Re: [RFC PATCH-tip v4 02/10] locking/rwsem: Stop active read lock  ASAP Christoph Hellwig <hch@infradead.org> - 2016-10-16 08:00 +0200

csiph-web