public inbox for [email protected]
 help / color / mirror / Atom feed
From: Jens Axboe <[email protected]>
To: Zorro Lang <[email protected]>, [email protected]
Cc: [email protected], [email protected]
Subject: Re: [xfstests generic/617] fsx io_uring dio starts to fail on overlayfs since v6.6-rc1
Date: Sun, 24 Sep 2023 13:16:36 -0600	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

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


  reply	other threads:[~2023-09-24 19:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-24 14:29 [xfstests generic/617] fsx io_uring dio starts to fail on overlayfs since v6.6-rc1 Zorro Lang
2023-09-24 15:45 ` Amir Goldstein
2023-09-24 17:52 ` Jens Axboe
2023-09-24 19:16   ` Jens Axboe [this message]
2023-09-25  6:35   ` Zorro Lang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox