summaryrefslogtreecommitdiffstats
path: root/fs/block_dev.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2018-11-06 14:29:11 -0700
committerJens Axboe <axboe@kernel.dk>2018-11-16 08:34:59 -0700
commitd34513d384487e8022f143a3a6b791e6d7f0dad6 (patch)
tree9d7bb4dcfa3c14f3099be3c253e366aea7b76863 /fs/block_dev.c
parent0619317ff8baa2da9238191ad5167ed3618c16d9 (diff)
downloadlinux-d34513d384487e8022f143a3a6b791e6d7f0dad6.tar.gz
linux-d34513d384487e8022f143a3a6b791e6d7f0dad6.tar.bz2
linux-d34513d384487e8022f143a3a6b791e6d7f0dad6.zip
block: for async O_DIRECT, mark us as polling if asked to
Inherit the iocb IOCB_HIPRI flag, and pass on REQ_HIPRI for those kinds of requests. Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/block_dev.c')
-rw-r--r--fs/block_dev.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/block_dev.c b/fs/block_dev.c
index 9fe56672cfe5..e72b119ede84 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -383,6 +383,9 @@ __blkdev_direct_IO(struct kiocb *iocb, struct iov_iter *iter, int nr_pages)
nr_pages = iov_iter_npages(iter, BIO_MAX_PAGES);
if (!nr_pages) {
+ if (iocb->ki_flags & IOCB_HIPRI)
+ bio->bi_opf |= REQ_HIPRI;
+
qc = submit_bio(bio);
break;
}