2020-02-07 12:08:44

by Xiaoguang Wang

[permalink] [raw]
Subject: [PATCH] ext4: start to support iopoll method

Since commit "b1b4705d54ab ext4: introduce direct I/O read using
iomap infrastructure", we can easily make ext4 support iopoll
method, just use iomap_dio_iopoll().

Signed-off-by: Xiaoguang Wang <[email protected]>
---
fs/ext4/file.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/fs/ext4/file.c b/fs/ext4/file.c
index 5f225881176b..0d624250a62b 100644
--- a/fs/ext4/file.c
+++ b/fs/ext4/file.c
@@ -872,6 +872,7 @@ const struct file_operations ext4_file_operations = {
.llseek = ext4_llseek,
.read_iter = ext4_file_read_iter,
.write_iter = ext4_file_write_iter,
+ .iopoll = iomap_dio_iopoll,
.unlocked_ioctl = ext4_ioctl,
#ifdef CONFIG_COMPAT
.compat_ioctl = ext4_compat_ioctl,
--
2.17.2


2020-02-10 10:32:47

by Jan Kara

[permalink] [raw]
Subject: Re: [PATCH] ext4: start to support iopoll method

On Fri 07-02-20 20:07:58, Xiaoguang Wang wrote:
> Since commit "b1b4705d54ab ext4: introduce direct I/O read using
> iomap infrastructure", we can easily make ext4 support iopoll
> method, just use iomap_dio_iopoll().
>
> Signed-off-by: Xiaoguang Wang <[email protected]>

The patch looks good to me. You can add:

Reviewed-by: Jan Kara <[email protected]>

Honza

> ---
> fs/ext4/file.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/fs/ext4/file.c b/fs/ext4/file.c
> index 5f225881176b..0d624250a62b 100644
> --- a/fs/ext4/file.c
> +++ b/fs/ext4/file.c
> @@ -872,6 +872,7 @@ const struct file_operations ext4_file_operations = {
> .llseek = ext4_llseek,
> .read_iter = ext4_file_read_iter,
> .write_iter = ext4_file_write_iter,
> + .iopoll = iomap_dio_iopoll,
> .unlocked_ioctl = ext4_ioctl,
> #ifdef CONFIG_COMPAT
> .compat_ioctl = ext4_compat_ioctl,
> --
> 2.17.2
>
--
Jan Kara <[email protected]>
SUSE Labs, CR

2020-03-02 09:17:29

by Xiaoguang Wang

[permalink] [raw]
Subject: Re: [PATCH] ext4: start to support iopoll method

hi,

Ted, could you please consider applying this patch? Iouring polling
tests in ext4 needs this patch, Jan Kara has nicely reviewed this patch, thanks.

Regards,
Xiaoguang Wang

> Since commit "b1b4705d54ab ext4: introduce direct I/O read using
> iomap infrastructure", we can easily make ext4 support iopoll
> method, just use iomap_dio_iopoll().
>
> Signed-off-by: Xiaoguang Wang <[email protected]>
> ---
> fs/ext4/file.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/fs/ext4/file.c b/fs/ext4/file.c
> index 5f225881176b..0d624250a62b 100644
> --- a/fs/ext4/file.c
> +++ b/fs/ext4/file.c
> @@ -872,6 +872,7 @@ const struct file_operations ext4_file_operations = {
> .llseek = ext4_llseek,
> .read_iter = ext4_file_read_iter,
> .write_iter = ext4_file_write_iter,
> + .iopoll = iomap_dio_iopoll,
> .unlocked_ioctl = ext4_ioctl,
> #ifdef CONFIG_COMPAT
> .compat_ioctl = ext4_compat_ioctl,
>

2020-03-02 19:16:49

by Theodore Ts'o

[permalink] [raw]
Subject: Re: [PATCH] ext4: start to support iopoll method

On Mon, Mar 02, 2020 at 05:17:09PM +0800, Xiaoguang Wang wrote:
> hi,
>
> Ted, could you please consider applying this patch? Iouring polling
> tests in ext4 needs this patch, Jan Kara has nicely reviewed this patch, thanks.

Yeah, I had been waiting to make sure the fix: "io_uring: fix
poll_list race for SETUP_IOPOLL|SETUP_SQPOLL" was going to land.

Am I correct that the bug fixed in the above fix isn't going to impact
xfstests (since it looks like there are no fio runs with the io_uring
engine at the moment)?

- Ted

2020-03-04 13:41:53

by Xiaoguang Wang

[permalink] [raw]
Subject: Re: [PATCH] ext4: start to support iopoll method

hi,

Sorry for being late.
> On Mon, Mar 02, 2020 at 05:17:09PM +0800, Xiaoguang Wang wrote:
>> hi,
>>
>> Ted, could you please consider applying this patch? Iouring polling
>> tests in ext4 needs this patch, Jan Kara has nicely reviewed this patch, thanks.
>
> Yeah, I had been waiting to make sure the fix: "io_uring: fix
> poll_list race for SETUP_IOPOLL|SETUP_SQPOLL" was going to land.
I confirmed that it had been merged into mainline.

>
> Am I correct that the bug fixed in the above fix isn't going to impact
> xfstests (since it looks like there are no fio runs with the io_uring
> engine at the moment)?
Yes, I have run xfstests with "-g auto", with or without this patch, there always
are six same failed test cases, so I think it won't impact current xfstests, thanks.

Regards,
Xiaoguang Wang
>
> - Ted
>

2020-03-05 20:40:56

by Theodore Ts'o

[permalink] [raw]
Subject: Re: [PATCH] ext4: start to support iopoll method

On Wed, Mar 04, 2020 at 09:40:54PM +0800, Xiaoguang Wang wrote:
> hi,
>
> Sorry for being late.
> > On Mon, Mar 02, 2020 at 05:17:09PM +0800, Xiaoguang Wang wrote:
> > > hi,
> > >
> > > Ted, could you please consider applying this patch? Iouring polling
> > > tests in ext4 needs this patch, Jan Kara has nicely reviewed this patch, thanks.
> >
> > Yeah, I had been waiting to make sure the fix: "io_uring: fix
> > poll_list race for SETUP_IOPOLL|SETUP_SQPOLL" was going to land.
> I confirmed that it had been merged into mainline.
>
> >
> > Am I correct that the bug fixed in the above fix isn't going to impact
> > xfstests (since it looks like there are no fio runs with the io_uring
> > engine at the moment)?
> Yes, I have run xfstests with "-g auto", with or without this patch, there always
> are six same failed test cases, so I think it won't impact current xfstests, thanks.

Thanks, applied.

- Ted