Re: [PATCH 2/2] block: Delete bio_set_prio()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 02, 2024 at 11:19:57AM +0000, John Garry wrote:
> Since commit 43b62ce3ff0a ("block: move bio io prio to a new field"), macro
> bio_set_prio() does nothing but set bio->bi_ioprio. All other places just
> set bio->bi_ioprio directly, so replace bio_set_prio() remaining
> callsites with setting bio->bi_ioprio directly and delete that macro.
> 
> Signed-off-by: John Garry <john.g.garry@xxxxxxxxxx>
> ---
>  drivers/block/rnbd/rnbd-srv.c | 2 +-
>  drivers/md/bcache/movinggc.c  | 2 +-
>  drivers/md/bcache/writeback.c | 2 +-
>  fs/bcachefs/move.c            | 6 +++---
>  include/linux/bio.h           | 2 --
>  5 files changed, 6 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/block/rnbd/rnbd-srv.c b/drivers/block/rnbd/rnbd-srv.c
> index 08ce6d96d04c..2ee6e9bd4e28 100644
> --- a/drivers/block/rnbd/rnbd-srv.c
> +++ b/drivers/block/rnbd/rnbd-srv.c
> @@ -167,7 +167,7 @@ static int process_rdma(struct rnbd_srv_session *srv_sess,
>  	bio->bi_iter.bi_sector = le64_to_cpu(msg->sector);
>  	prio = srv_sess->ver < RNBD_PROTO_VER_MAJOR ||
>  	       usrlen < sizeof(*msg) ? 0 : le16_to_cpu(msg->prio);
> -	bio_set_prio(bio, prio);
> +	bio->bi_ioprio = prio;
>  
>  	submit_bio(bio);
>  
> diff --git a/drivers/md/bcache/movinggc.c b/drivers/md/bcache/movinggc.c
> index ef6abf33f926..45ca134cbf02 100644
> --- a/drivers/md/bcache/movinggc.c
> +++ b/drivers/md/bcache/movinggc.c
> @@ -82,7 +82,7 @@ static void moving_init(struct moving_io *io)
>  	bio_init(bio, NULL, bio->bi_inline_vecs,
>  		 DIV_ROUND_UP(KEY_SIZE(&io->w->key), PAGE_SECTORS), 0);
>  	bio_get(bio);
> -	bio_set_prio(bio, IOPRIO_PRIO_VALUE(IOPRIO_CLASS_IDLE, 0));
> +	bio->bi_ioprio = IOPRIO_PRIO_VALUE(IOPRIO_CLASS_IDLE, 0);
>  
>  	bio->bi_iter.bi_size	= KEY_SIZE(&io->w->key) << 9;
>  	bio->bi_private		= &io->cl;
> diff --git a/drivers/md/bcache/writeback.c b/drivers/md/bcache/writeback.c
> index c1d28e365910..453efbbdc8ee 100644
> --- a/drivers/md/bcache/writeback.c
> +++ b/drivers/md/bcache/writeback.c
> @@ -334,7 +334,7 @@ static void dirty_init(struct keybuf_key *w)
>  	bio_init(bio, NULL, bio->bi_inline_vecs,
>  		 DIV_ROUND_UP(KEY_SIZE(&w->key), PAGE_SECTORS), 0);
>  	if (!io->dc->writeback_percent)
> -		bio_set_prio(bio, IOPRIO_PRIO_VALUE(IOPRIO_CLASS_IDLE, 0));
> +		bio->bi_ioprio = IOPRIO_PRIO_VALUE(IOPRIO_CLASS_IDLE, 0);
>  
>  	bio->bi_iter.bi_size	= KEY_SIZE(&w->key) << 9;
>  	bio->bi_private		= w;


For bcache part, Acked-by: Coly Li <colyli@xxxxxxx>

Thanks.

Coly Li




[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux