[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20161016055731.GA21379@infradead.org>
Date: Sat, 15 Oct 2016 22:57:31 -0700
From: Christoph Hellwig <hch@...radead.org>
To: Dave Chinner <david@...morbit.com>
Cc: Christoph Hellwig <hch@...radead.org>,
Davidlohr Bueso <dave@...olabs.net>,
Waiman Long <Waiman.Long@....com>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org,
x86@...nel.org, linux-alpha@...r.kernel.org,
linux-ia64@...r.kernel.org, linux-s390@...r.kernel.org,
linux-arch@...r.kernel.org, linux-doc@...r.kernel.org,
Jason Low <jason.low2@...com>,
Jonathan Corbet <corbet@....net>,
Scott J Norton <scott.norton@....com>,
Douglas Hatch <doug.hatch@....com>
Subject: Re: [RFC PATCH-tip v4 02/10] locking/rwsem: Stop active read lock
ASAP
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.
Powered by blists - more mailing lists