Skip to contentSkip to conversation

ext4: start to support iopoll method

PATCH Applied Xiaoguang Wang 3 participants 6 messages Feb 7, 2020 – Mar 5, 2020 ext4 file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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().

---
 fs/ext4/file.c | 1 +
 1 file changed, 1 insertion(+)
fs/ext4/file.c +1 -0
index 5f225881176b..0d624250a62b 100644
@@ -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,
Signature · 1 line
2.17.2
reviewer Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · 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().

The patch looks good to me. You can add:

Honza

Quoted 19 lines
---
 fs/ext4/file.c | 1 +
 1 file changed, 1 insertion(+)
fs/ext4/file.c +1 -0
index 5f225881176b..0d624250a62b 100644
@@ -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,
Signature · 1 line
2.17.2
Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR
#2 lore raw
In reply to Xiaoguang Wang

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

Quoted 22 lines

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().

---
  fs/ext4/file.c | 1 +
  1 file changed, 1 insertion(+)
fs/ext4/file.c +1 -0
index 5f225881176b..0d624250a62b 100644
@@ -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,
maintainer
#3 lore raw
Quoted 4 lines · Xiaoguang Wang

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

#4 lore raw

hi,

Sorry for being late.

Quoted 8 lines · Xiaoguang Wang
Quoted 4 lines

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.

Quoted 4 lines

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

Quoted 3 lines

- Ted

maintainer Applied
#5 lore raw
Quoted 11 lines · Xiaoguang Wang

hi,

Sorry for being late.

Quoted 8 lines · Xiaoguang Wang
Quoted 4 lines

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.

Quoted 8 lines

I confirmed that it had been merged into mainline.

Quoted 4 lines

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