Re: [PATCH v5 02/12] dax: introduce IS_DEVDAX() and IS_FSDAX()

2018-03-02 Thread Christoph Hellwig
> +static inline bool IS_DEVDAX(struct inode *inode) > +{ > + if (!IS_ENABLED(CONFIG_DEV_DAX)) > + return false; > + if ((inode->i_flags & S_DAX) == 0) > + return false; > + if (!S_ISCHR(inode->i_mode)) > + return false; > + return true; > +} > +

Re: [PATCH v5 02/12] dax: introduce IS_DEVDAX() and IS_FSDAX()

2018-03-02 Thread Christoph Hellwig
> +static inline bool IS_DEVDAX(struct inode *inode) > +{ > + if (!IS_ENABLED(CONFIG_DEV_DAX)) > + return false; > + if ((inode->i_flags & S_DAX) == 0) > + return false; > + if (!S_ISCHR(inode->i_mode)) > + return false; > + return true; > +} > +

Re: [PATCH v5 02/12] dax: introduce IS_DEVDAX() and IS_FSDAX()

2018-03-02 Thread Dan Williams
On Fri, Mar 2, 2018 at 9:45 AM, Darrick J. Wong wrote: > On Thu, Mar 01, 2018 at 07:53:44PM -0800, Dan Williams wrote: >> The current IS_DAX() helper that checks if a file is in DAX mode serves >> two purposes. It is a control flow branch condition for DAX vs >> non-DAX

Re: [PATCH v5 02/12] dax: introduce IS_DEVDAX() and IS_FSDAX()

2018-03-02 Thread Dan Williams
On Fri, Mar 2, 2018 at 9:45 AM, Darrick J. Wong wrote: > On Thu, Mar 01, 2018 at 07:53:44PM -0800, Dan Williams wrote: >> The current IS_DAX() helper that checks if a file is in DAX mode serves >> two purposes. It is a control flow branch condition for DAX vs >> non-DAX paths and it is a

Re: [PATCH v5 02/12] dax: introduce IS_DEVDAX() and IS_FSDAX()

2018-03-02 Thread Darrick J. Wong
On Thu, Mar 01, 2018 at 07:53:44PM -0800, Dan Williams wrote: > The current IS_DAX() helper that checks if a file is in DAX mode serves > two purposes. It is a control flow branch condition for DAX vs > non-DAX paths and it is a mechanism to perform dead code elimination. The > dead code

Re: [PATCH v5 02/12] dax: introduce IS_DEVDAX() and IS_FSDAX()

2018-03-02 Thread Darrick J. Wong
On Thu, Mar 01, 2018 at 07:53:44PM -0800, Dan Williams wrote: > The current IS_DAX() helper that checks if a file is in DAX mode serves > two purposes. It is a control flow branch condition for DAX vs > non-DAX paths and it is a mechanism to perform dead code elimination. The > dead code

[PATCH v5 02/12] dax: introduce IS_DEVDAX() and IS_FSDAX()

2018-03-01 Thread Dan Williams
The current IS_DAX() helper that checks if a file is in DAX mode serves two purposes. It is a control flow branch condition for DAX vs non-DAX paths and it is a mechanism to perform dead code elimination. The dead code elimination is required in the CONFIG_FS_DAX=n case since there are symbols in

[PATCH v5 02/12] dax: introduce IS_DEVDAX() and IS_FSDAX()

2018-03-01 Thread Dan Williams
The current IS_DAX() helper that checks if a file is in DAX mode serves two purposes. It is a control flow branch condition for DAX vs non-DAX paths and it is a mechanism to perform dead code elimination. The dead code elimination is required in the CONFIG_FS_DAX=n case since there are symbols in