From: Bijan Mottahedeh <[email protected]>
To: [email protected]
Cc: [email protected]
Subject: [RFC 0/2] io_uring: don't use kiocb.private to store buf_index
Date: Tue, 19 May 2020 14:52:48 -0700 [thread overview]
Message-ID: <[email protected]> (raw)
This patch set addresses problems hit when running liburing
500f9fbadef8-test.
- Patch 1 is a suggested fix to overloading of kiocb.private since it
can be written by iomap_dio_rw().
io_import_iovec() can fail a submission as follows:
/* buffer index only valid with fixed read/write, or buffer select */
if (req->rw.kiocb.private && !(req->flags & REQ_F_BUFFER_SELECT))
return -EINVAL;
so a read request fails with -EINVAL upon retry if iomap_dio_rw() has
written to iocb->private:
WRITE_ONCE(iocb->private, dio->submit.last_queue);
The suggested fix is use a separate variable to store buf_index.
- Patch 2 reverts c58c1f8343 which had changed the error for
REQ_NOWAIT requests to non-mq queue from -ENOTSUP to -EAGAIN.
/*
* Non-mq queues do not honor REQ_NOWAIT, so complete a bio
* with BLK_STS_AGAIN status in order to catch -EAGAIN and
* to give a chance to the caller to repeat request gracefully.
*/
if ((bio->bi_opf & REQ_NOWAIT) && !queue_is_mq(q)) {
status = BLK_STS_AGAIN;
goto end_io;
}
I'm not clear what the original reasoning was but io_wq_submit_work()
will call io_issue_sqe() continuously as long as -EAGAIN is returned.
I'm not sure if this could break something else.
I ran fio as specified in c58c1f8343 with this change and don't see any errors.
Bijan Mottahedeh (2):
io_uring: don't use kiocb.private to store buf_index
io_uring: mark REQ_NOWAIT for a non-mq queue as unspported
block/blk-core.c | 10 +++-------
fs/io_uring.c | 15 +++++++--------
2 files changed, 10 insertions(+), 15 deletions(-)
--
1.8.3.1
next reply other threads:[~2020-05-19 21:53 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-19 21:52 Bijan Mottahedeh [this message]
2020-05-19 21:52 ` [RFC 1/2] io_uring: don't use kiocb.private to store buf_index Bijan Mottahedeh
2020-05-19 22:07 ` Jens Axboe
2020-05-19 22:20 ` Jens Axboe
2020-05-19 22:48 ` Bijan Mottahedeh
2020-05-19 21:52 ` [RFC 2/2] io_uring: mark REQ_NOWAIT for a non-mq queue as unspported Bijan Mottahedeh
2020-05-28 18:35 ` Jeff Moyer
2020-05-28 19:01 ` Jens Axboe
2020-05-28 19:22 ` Jens Axboe
2020-05-28 19:31 ` Jeff Moyer
2020-05-28 22:12 ` Jeff Moyer
2020-05-28 23:03 ` Jens Axboe
2020-05-29 15:02 ` Jeff Moyer
2020-05-29 16:20 ` Jens Axboe
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 \
--in-reply-to=1589925170-48687-1-git-send-email-bijan.mottahedeh@oracle.com \
[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