linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC 1/2] fs/iomap/direct-io: pass NOWAIT to bio flags
@ 2020-05-04 15:54 Konstantin Khlebnikov
  2020-05-04 15:54 ` [PATCH RFC 2/2] fs/direct-io: pass NOWAIT to also for read requests Konstantin Khlebnikov
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Konstantin Khlebnikov @ 2020-05-04 15:54 UTC (permalink / raw)
  To: linux-kernel, linux-block; +Cc: Jens Axboe, Christoph Hellwig

This is required to avoid waiting in lower layers.

Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
---
 fs/iomap/direct-io.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/iomap/direct-io.c b/fs/iomap/direct-io.c
index 20dde5aadcdd..9b53fa7651e3 100644
--- a/fs/iomap/direct-io.c
+++ b/fs/iomap/direct-io.c
@@ -63,6 +63,8 @@ static void iomap_dio_submit_bio(struct iomap_dio *dio, struct iomap *iomap,
 {
 	atomic_inc(&dio->ref);
 
+	if (dio->iocb->ki_flags & IOCB_NOWAIT)
+		bio->bi_opf |= REQ_NOWAIT;
 	if (dio->iocb->ki_flags & IOCB_HIPRI)
 		bio_set_polled(bio, dio->iocb);
 


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-05-06 14:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH RFC 2/2] fs/direct-io: pass NOWAIT to also for read requests Konstantin Khlebnikov
2020-05-06 14:40   ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).