[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <xrrvym37rltbopjxuz2cozkladm7nlklms46dnddexlpxva373@xrsrq3y54qsv>
Date: Tue, 3 Dec 2024 00:21:07 +0800
From: Coly Li <colyli@...e.de>
To: John Garry <john.g.garry@...cle.com>
Cc: axboe@...nel.dk, haris.iqbal@...os.com, jinpu.wang@...os.com,
kent.overstreet@...ux.dev, agk@...hat.com, snitzer@...nel.org, mpatocka@...hat.com,
linux-block@...r.kernel.org, linux-kernel@...r.kernel.org, linux-bcache@...r.kernel.org,
dm-devel@...ts.linux.dev, linux-bcachefs@...r.kernel.org, hch@....de
Subject: Re: [PATCH 2/2] block: Delete bio_set_prio()
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@...cle.com>
> ---
> 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@...e.de>
Thanks.
Coly Li
Powered by blists - more mailing lists