diff mbox

[v5,4/5] fs: blkdev set bio prio from kiocb prio

Message ID 20180521160147.2372-5-adam.manzanares@wdc.com (mailing list archive)
State New, archived
Headers show

Commit Message

Adam Manzanares May 21, 2018, 4:01 p.m. UTC
From: Adam Manzanares <adam.manzanares@wdc.com>

Now that kiocb has an ioprio field copy this over to the bio when it is
created from the kiocb.

Signed-off-by: Adam Manzanares <adam.manzanares@wdc.com>
---
 fs/block_dev.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Jeff Moyer May 21, 2018, 8:59 p.m. UTC | #1
adam.manzanares@wdc.com writes:

> From: Adam Manzanares <adam.manzanares@wdc.com>
>
> Now that kiocb has an ioprio field copy this over to the bio when it is
> created from the kiocb.
>
> Signed-off-by: Adam Manzanares <adam.manzanares@wdc.com>

Reviewed-by: Jeff Moyer <jmoyer@redhat.com>


> ---
>  fs/block_dev.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/fs/block_dev.c b/fs/block_dev.c
> index 7ec920e27065..da1e94d2bb75 100644
> --- a/fs/block_dev.c
> +++ b/fs/block_dev.c
> @@ -355,6 +355,7 @@ __blkdev_direct_IO(struct kiocb *iocb, struct iov_iter *iter, int nr_pages)
>  		bio->bi_write_hint = iocb->ki_hint;
>  		bio->bi_private = dio;
>  		bio->bi_end_io = blkdev_bio_end_io;
> +		bio->bi_ioprio = iocb->ki_ioprio;
>  
>  		ret = bio_iov_iter_get_pages(bio, iter);
>  		if (unlikely(ret)) {
Jeff Moyer May 21, 2018, 9:04 p.m. UTC | #2
adam.manzanares@wdc.com writes:

> From: Adam Manzanares <adam.manzanares@wdc.com>
>
> Now that kiocb has an ioprio field copy this over to the bio when it is
> created from the kiocb.
>
> Signed-off-by: Adam Manzanares <adam.manzanares@wdc.com>
> ---
>  fs/block_dev.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/fs/block_dev.c b/fs/block_dev.c
> index 7ec920e27065..da1e94d2bb75 100644
> --- a/fs/block_dev.c
> +++ b/fs/block_dev.c
> @@ -355,6 +355,7 @@ __blkdev_direct_IO(struct kiocb *iocb, struct iov_iter *iter, int nr_pages)
>  		bio->bi_write_hint = iocb->ki_hint;
>  		bio->bi_private = dio;
>  		bio->bi_end_io = blkdev_bio_end_io;
> +		bio->bi_ioprio = iocb->ki_ioprio;
>  
>  		ret = bio_iov_iter_get_pages(bio, iter);
>  		if (unlikely(ret)) {

Forgot to mention, you should also convert __blkdev_direct_IO_simple.

-Jeff
Adam Manzanares May 21, 2018, 9:43 p.m. UTC | #3
On 5/21/18 2:04 PM, Jeff Moyer wrote:
> adam.manzanares@wdc.com writes:

> 

>> From: Adam Manzanares <adam.manzanares@wdc.com>

>>

>> Now that kiocb has an ioprio field copy this over to the bio when it is

>> created from the kiocb.

>>

>> Signed-off-by: Adam Manzanares <adam.manzanares@wdc.com>

>> ---

>>   fs/block_dev.c | 1 +

>>   1 file changed, 1 insertion(+)

>>

>> diff --git a/fs/block_dev.c b/fs/block_dev.c

>> index 7ec920e27065..da1e94d2bb75 100644

>> --- a/fs/block_dev.c

>> +++ b/fs/block_dev.c

>> @@ -355,6 +355,7 @@ __blkdev_direct_IO(struct kiocb *iocb, struct iov_iter *iter, int nr_pages)

>>   		bio->bi_write_hint = iocb->ki_hint;

>>   		bio->bi_private = dio;

>>   		bio->bi_end_io = blkdev_bio_end_io;

>> +		bio->bi_ioprio = iocb->ki_ioprio;

>>   

>>   		ret = bio_iov_iter_get_pages(bio, iter);

>>   		if (unlikely(ret)) {

> 

> Forgot to mention, you should also convert __blkdev_direct_IO_simple.


NP.

> 

> -Jeff

>
diff mbox

Patch

diff --git a/fs/block_dev.c b/fs/block_dev.c
index 7ec920e27065..da1e94d2bb75 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -355,6 +355,7 @@  __blkdev_direct_IO(struct kiocb *iocb, struct iov_iter *iter, int nr_pages)
 		bio->bi_write_hint = iocb->ki_hint;
 		bio->bi_private = dio;
 		bio->bi_end_io = blkdev_bio_end_io;
+		bio->bi_ioprio = iocb->ki_ioprio;
 
 		ret = bio_iov_iter_get_pages(bio, iter);
 		if (unlikely(ret)) {