2020-02-21 00:42:08

by Ira Weiny

[permalink] [raw]
Subject: [PATCH V4 03/13] fs: Remove unneeded IS_DAX() check

From: Ira Weiny <[email protected]>

Remove the check because DAX now has it's own read/write methods and
file systems which support DAX check IS_DAX() prior to IOCB_DIRECT on
their own. Therefore, it does not matter if the file state is DAX when
the iocb flags are created.

Reviewed-by: Jan Kara <[email protected]>
Signed-off-by: Ira Weiny <[email protected]>

---
Changes from v3:
Reword commit message.
Reordered to be a 'pre-cleanup' patch
---
include/linux/fs.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/fs.h b/include/linux/fs.h
index 3cd4fe6b845e..63d1e533a07d 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -3388,7 +3388,7 @@ extern int file_update_time(struct file *file);

static inline bool io_is_direct(struct file *filp)
{
- return (filp->f_flags & O_DIRECT) || IS_DAX(filp->f_mapping->host);
+ return (filp->f_flags & O_DIRECT);
}

static inline bool vma_is_dax(struct vm_area_struct *vma)
--
2.21.0


2020-02-21 01:42:47

by Dave Chinner

[permalink] [raw]
Subject: Re: [PATCH V4 03/13] fs: Remove unneeded IS_DAX() check

On Thu, Feb 20, 2020 at 04:41:24PM -0800, [email protected] wrote:
> From: Ira Weiny <[email protected]>
>
> Remove the check because DAX now has it's own read/write methods and
> file systems which support DAX check IS_DAX() prior to IOCB_DIRECT on
> their own. Therefore, it does not matter if the file state is DAX when
> the iocb flags are created.
>
> Reviewed-by: Jan Kara <[email protected]>
> Signed-off-by: Ira Weiny <[email protected]>

Yup, looks good.

Reviewed-by: Dave Chinner <[email protected]>
--
Dave Chinner
[email protected]

2020-02-21 23:04:40

by Ira Weiny

[permalink] [raw]
Subject: Re: [PATCH V4 03/13] fs: Remove unneeded IS_DAX() check

On Fri, Feb 21, 2020 at 12:42:25PM +1100, Dave Chinner wrote:
> On Thu, Feb 20, 2020 at 04:41:24PM -0800, [email protected] wrote:
> > From: Ira Weiny <[email protected]>
> >
> > Remove the check because DAX now has it's own read/write methods and
> > file systems which support DAX check IS_DAX() prior to IOCB_DIRECT on
> > their own. Therefore, it does not matter if the file state is DAX when
> > the iocb flags are created.
> >
> > Reviewed-by: Jan Kara <[email protected]>
> > Signed-off-by: Ira Weiny <[email protected]>
>
> Yup, looks good.
>
> Reviewed-by: Dave Chinner <[email protected]>

Thanks,
Ira

> --
> Dave Chinner
> [email protected]