Re: [PATCHv5 1/1] block: introduce content activity based ioprio

From: Matthew Wilcox
Date: Tue Jan 30 2024 - 08:52:37 EST


On Tue, Jan 30, 2024 at 04:42:07PM +0800, zhaoyang.huang wrote:
> +static __maybe_unused
> +bool act_bio_add_folio(struct bio *bio, struct folio *folio, size_t len,
> + size_t off)

No, stop this. What the filesystem needs to do is not
s/bio_add_folio/act_bio_add_folio/. There needs to be an API to set the
bio prio; something like:

bio_set_active_prio(bio, folio);

and then you can do whatever gunk is needed in bio_set_active_prio()
to end up calling bio_set_prio().