[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190813104547.GA3911@poseidon.bobrowski.net>
Date: Tue, 13 Aug 2019 20:45:48 +1000
From: Matthew Bobrowski <mbobrowski@...browski.org>
To: Matthew Wilcox <willy@...radead.org>
Cc: Christoph Hellwig <hch@...radead.org>, linux-ext4@...r.kernel.org,
linux-fsdevel@...r.kernel.org, jack@...e.cz, tytso@....edu,
riteshh@...ux.ibm.com
Subject: Re: [PATCH 1/5] ext4: introduce direct IO read code path using iomap
infrastructure
On Mon, Aug 12, 2019 at 01:17:35PM -0700, Matthew Wilcox wrote:
> On Mon, Aug 12, 2019 at 10:18:35AM -0700, Christoph Hellwig wrote:
> > > return -EIO;
> > >
> > > if (!iov_iter_count(to))
> > > return 0; /* skip atime */
> > >
> > > #ifdef CONFIG_FS_DAX
> > > - if (IS_DAX(file_inode(iocb->ki_filp)))
> > > + if (IS_DAX(inode))
> > > return ext4_dax_read_iter(iocb, to);
> > > #endif
> >
> > Same here.
>
> It doesn't even need IS_ENABLED.
>
> include/linux/fs.h:#define IS_DAX(inode) ((inode)->i_flags & S_DAX)
>
> #ifdef CONFIG_FS_DAX
> #define S_DAX 8192 /* Direct Access, avoiding the page cache */
> #else
> #define S_DAX 0 /* Make all the DAX code disappear */
> #endif
Ah, clever - I like it! I actually didn't see this and thank you for
highlighting. I guess I will be dropping the CONFIG_FS_DAX statement
here...
--M
Powered by blists - more mailing lists