Re: [xfstests generic/617] fsx io_uring dio starts to fail on overlayfs since v6.6-rc1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/24/23 11:52 AM, Jens Axboe wrote:
> On 9/24/23 8:29 AM, Zorro Lang wrote:
>> Hi,
>>
>> The generic/617 of fstests is a test case does IO_URING soak direct-IO
>> fsx test, but recently (about from v6.6-rc1 to now) it always fails on
>> overlayfs as [1], no matter the underlying fs is ext4 or xfs. But it
>> never failed on overlay before, likes [2].
>>
>> So I thought it might be a regression of overlay or io-uring on current v6.6.
>> Please help to review, it's easy to reproduce. My system is Fedora-rawhide/RHEL-9,
>> with upstream mainline linux HEAD=dc912ba91b7e2fa74650a0fc22cccf0e0d50f371.
>> The generic/617.full output as [3].
> 
> It works without overlayfs - would be great if you could include how to
> reproduce this with overlayfs.

Try this. Certainly looks like this could be the issue, overlayfs is
copying the flags but it doesn't handle IOCB_DIO_CALLER_COMP. So it
either needs to handle that, or just disabled it. Seems like the latter
is the easier/saner solution here, which is what the below does.

diff --git a/fs/overlayfs/file.c b/fs/overlayfs/file.c
index 4193633c4c7a..d6c8ca64328b 100644
--- a/fs/overlayfs/file.c
+++ b/fs/overlayfs/file.c
@@ -410,7 +410,7 @@ static ssize_t ovl_write_iter(struct kiocb *iocb, struct iov_iter *iter)
 		real.flags = 0;
 		aio_req->orig_iocb = iocb;
 		kiocb_clone(&aio_req->iocb, iocb, get_file(real.file));
-		aio_req->iocb.ki_flags = ifl;
+		aio_req->iocb.ki_flags = ifl & ~IOCB_DIO_CALLER_COMP;
 		aio_req->iocb.ki_complete = ovl_aio_rw_complete;
 		refcount_set(&aio_req->ref, 2);
 		kiocb_start_write(&aio_req->iocb);

-- 
Jens Axboe




[Index of Archives]     [Linux Filesystems Devel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux