fs/buffer: using __bio_add_page in submit_bh_wbc()
Subsystems (2)
PATCH 1/1 fs/buffer: using __bio_add_page in submit_bh_wbc()
From: Gou Hao <[email protected]>
In submit_bh_wbc(), bio is newly allocated, so it
does not need any merging logic.
And using bio_add_page here will execute 'bio_flagged( bio, BIO_CLONED)' and 'bio_full' twice, which is unnecessary.
--- fs/buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/buffer.c +1 -1
@@ -2760,7 +2760,7 @@ static void submit_bh_wbc(blk_opf_t opf, struct buffer_head *bh, bio->bi_iter.bi_sector = bh->b_blocknr * (bh->b_size >>9 ); -bio_add_page (bio, bh->b_page, bh->b_size,bh_offset (bh)); +__bio_add_page (bio, bh->b_page, bh->b_size,bh_offset (bh));BUG_ON (bio->bi_iter.bi_size != bh->b_size); bio->bi_end_io = end_bio_bh_io_sync;
Signature · 1 line
2.20.1
Quoted 7 lines · On Tue, May 30, 2023 at 11:32:39AM +0800, [email protected] wrote:
From: Gou Hao <[email protected]>
In
submit_bh_wbc(), bio is newly allocated, so it
does not need any merging logic.And using
bio_add_pagehere will execute 'bio_flagged( bio, BIO_CLONED)' and 'bio_full' twice, which is unnecessary.
https://lore.kernel.org/linux-fsdevel/[email protected]/
You could send some Reviewed-by: tags to that patch series.
Quoted 12 lines · Matthew Wilcox
Quoted 7 lines · On Tue, May 30, 2023 at 11:32:39AM +0800, [email protected] wrote:
From: Gou Hao <[email protected]>
In
submit_bh_wbc(), bio is newly allocated, so it
does not need any merging logic.And using
bio_add_pagehere will execute 'bio_flagged( bio, BIO_CLONED)' and 'bio_full' twice, which is unnecessary.https://lore.kernel.org/linux-fsdevel/[email protected]/
You could send some Reviewed-by: tags to that patch series.
Ok, I didn't notice this patchset, thank you for your review.
Signature · 2 lines
thanks, Gou Hao