On Wed, Mar 23, 2022 at 08:10:51AM +0800, Qu Wenruo wrote: >> } >> >> WARN_ON(!spage->page); >> - bio = btrfs_bio_alloc(1); >> - bio_set_dev(bio, spage->dev->bdev); >> - >> - bio_add_page(bio, spage->page, fs_info->sectorsize, 0); >> - bio->bi_iter.bi_sector = spage->physical >> 9; >> - bio->bi_opf = REQ_OP_READ; >> + bio_init(&bio, spage->dev->bdev, &bvec, 1, REQ_OP_READ); >> + __bio_add_page(&bio, spage->page, fs_info->sectorsize, 0); > > Can we make the naming for __bio_add_page() better? > > With more on-stack bio usage, such __bio_add_page() is really a little > embarrassing. __bio_add_page is really just a micro-optimize version of __bio_add_page for sinle page users like this. To be honest we should probably just stop using it and I should not have added it here.