Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'gfs2-v5.7-rc7.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2

Pull gfs2 fix from Andreas Gruenbacher:
"Fix the previous, flawed gfs2_find_jhead commit"

* tag 'gfs2-v5.7-rc7.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2:
gfs2: Even more gfs2_find_jhead fixes

+5 -10
+5 -10
fs/gfs2/lops.c
··· 509 509 unsigned int bsize = sdp->sd_sb.sb_bsize, off; 510 510 unsigned int bsize_shift = sdp->sd_sb.sb_bsize_shift; 511 511 unsigned int shift = PAGE_SHIFT - bsize_shift; 512 - unsigned int max_bio_size = 2 * 1024 * 1024; 512 + unsigned int max_blocks = 2 * 1024 * 1024 >> bsize_shift; 513 513 struct gfs2_journal_extent *je; 514 514 int sz, ret = 0; 515 515 struct bio *bio = NULL; 516 516 struct page *page = NULL; 517 - bool bio_chained = false, done = false; 517 + bool done = false; 518 518 errseq_t since; 519 519 520 520 memset(head, 0, sizeof(*head)); ··· 537 537 off = 0; 538 538 } 539 539 540 - if (!bio || (bio_chained && !off) || 541 - bio->bi_iter.bi_size >= max_bio_size) { 542 - /* start new bio */ 543 - } else { 540 + if (bio && (off || block < blocks_submitted + max_blocks)) { 544 541 sector_t sector = dblock << sdp->sd_fsb2bb_shift; 545 542 546 543 if (bio_end_sector(bio) == sector) { ··· 550 553 (PAGE_SIZE - off) >> bsize_shift; 551 554 552 555 bio = gfs2_chain_bio(bio, blocks); 553 - bio_chained = true; 554 556 goto add_block_to_new_bio; 555 557 } 556 558 } 557 559 558 560 if (bio) { 559 - blocks_submitted = block + 1; 561 + blocks_submitted = block; 560 562 submit_bio(bio); 561 563 } 562 564 563 565 bio = gfs2_log_alloc_bio(sdp, dblock, gfs2_end_log_read); 564 566 bio->bi_opf = REQ_OP_READ; 565 - bio_chained = false; 566 567 add_block_to_new_bio: 567 568 sz = bio_add_page(bio, page, bsize, off); 568 569 BUG_ON(sz != bsize); ··· 568 573 off += bsize; 569 574 if (off == PAGE_SIZE) 570 575 page = NULL; 571 - if (blocks_submitted < 2 * max_bio_size >> bsize_shift) { 576 + if (blocks_submitted <= blocks_read + max_blocks) { 572 577 /* Keep at least one bio in flight */ 573 578 continue; 574 579 }