@@ -390,6 +390,7 @@ static loff_t iomap_readpage_iter(const struct iomap_iter *iter,
ctx->bio->bi_iter.bi_sector = sector;
ctx->bio->bi_end_io = iomap_read_end_io;
bio_add_folio_nofail(ctx->bio, folio, plen, poff);
+ bio_set_active_ioprio_folio(ctx->bio, folio);
}
done:
@@ -624,6 +625,7 @@ static int iomap_read_folio_sync(loff_t block_start, struct folio *folio,
bio_init(&bio, iomap->bdev, &bvec, 1, REQ_OP_READ);
bio.bi_iter.bi_sector = iomap_sector(iomap, block_start);
bio_add_folio_nofail(&bio, folio, plen, poff);
+ bio_set_active_ioprio_folio(&bio, folio);
return submit_bio_wait(&bio);
}
@@ -1742,6 +1744,7 @@ iomap_add_to_ioend(struct inode *inode, loff_t pos, struct folio *folio,
if (!bio_add_folio(wpc->ioend->io_bio, folio, len, poff)) {
wpc->ioend->io_bio = iomap_chain_bio(wpc->ioend->io_bio);
bio_add_folio_nofail(wpc->ioend->io_bio, folio, len, poff);
+ bio_set_active_ioprio_folio(wpc->ioend->io_bio, folio);
}
if (ifs)
@@ -308,6 +308,7 @@ static struct bio *do_mpage_readpage(struct mpage_readpage_args *args)
goto alloc_new;
}
+ bio_set_active_ioprio_folio(args->bio, folio);
relative_block = block_in_file - args->first_logical_block;
nblocks = map_bh->b_size >> blkbits;
if ((buffer_boundary(map_bh) && relative_block == nblocks) ||
@@ -626,6 +627,7 @@ static int __mpage_writepage(struct folio *folio, struct writeback_control *wbc,
goto alloc_new;
}
+ bio_set_active_ioprio_folio(bio, folio);
clean_buffers(&folio->page, first_unmapped);
BUG_ON(folio_test_writeback(folio));