diff options
author | Jens Axboe <axboe@kernel.dk> | 2018-11-06 14:29:11 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-11-16 08:34:59 -0700 |
commit | d34513d384487e8022f143a3a6b791e6d7f0dad6 (patch) | |
tree | 9d7bb4dcfa3c14f3099be3c253e366aea7b76863 /fs/block_dev.c | |
parent | 0619317ff8baa2da9238191ad5167ed3618c16d9 (diff) |
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.c | 3 |
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; } |