From: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
To: linux-kernel@vger.kernel.org, linux-block@vger.kernel.org
Cc: Jens Axboe <axboe@kernel.dk>, Christoph Hellwig <hch@infradead.org>
Subject: [PATCH RFC 2/2] fs/direct-io: pass NOWAIT to also for read requests
Date: Mon, 04 May 2020 18:54:57 +0300 [thread overview]
Message-ID: <158860769737.32485.3674517821826063792.stgit@buzz> (raw)
In-Reply-To: <158860769311.32485.8003552176738816448.stgit@buzz>
For some reason NOWAIT currently is passed only for writes.
Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Fixes: 03a07c92a9ed ("block: return on congested block device")
---
fs/direct-io.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/direct-io.c b/fs/direct-io.c
index 00b4d15bb811..dbb6afef6be9 100644
--- a/fs/direct-io.c
+++ b/fs/direct-io.c
@@ -1234,11 +1234,11 @@ do_blockdev_direct_IO(struct kiocb *iocb, struct inode *inode,
if (iov_iter_rw(iter) == WRITE) {
dio->op = REQ_OP_WRITE;
dio->op_flags = REQ_SYNC | REQ_IDLE;
- if (iocb->ki_flags & IOCB_NOWAIT)
- dio->op_flags |= REQ_NOWAIT;
} else {
dio->op = REQ_OP_READ;
}
+ if (iocb->ki_flags & IOCB_NOWAIT)
+ dio->op_flags |= REQ_NOWAIT;
if (iocb->ki_flags & IOCB_HIPRI)
dio->op_flags |= REQ_HIPRI;
next prev parent reply other threads:[~2020-05-04 15:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-04 15:54 [PATCH RFC 1/2] fs/iomap/direct-io: pass NOWAIT to bio flags Konstantin Khlebnikov
2020-05-04 15:54 ` Konstantin Khlebnikov [this message]
2020-05-06 14:40 ` [PATCH RFC 2/2] fs/direct-io: pass NOWAIT to also for read requests Christoph Hellwig
2020-05-04 16:00 ` [PATCH RFC 1/2] fs/iomap/direct-io: pass NOWAIT to bio flags Christoph Hellwig
2020-05-04 16:23 ` Konstantin Khlebnikov
2020-05-06 14:40 ` Christoph Hellwig
2020-05-06 14:40 ` Christoph Hellwig
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=158860769737.32485.3674517821826063792.stgit@buzz \
--to=khlebnikov@yandex-team.ru \
--cc=axboe@kernel.dk \
--cc=hch@infradead.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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