Commit 20be493
Andreas Gruenbacher
gfs2: Even more gfs2_find_jhead fixes
Fix several issues in the previous gfs2_find_jhead fix:
* When updating @blocks_submitted, @block refers to the first block block not
submitted yet, not the last block submitted, so fix an off-by-one error.
* We want to ensure that @blocks_submitted is far enough ahead of @blocks_read
to guarantee that there is in-flight I/O. Otherwise, we'll eventually end up
waiting for pages that haven't been submitted, yet.
* It's much easier to compare the number of blocks added with the number of
blocks submitted to limit the maximum bio size.
* Even with bio chaining, we can keep adding blocks until we reach the maximum
bio size, as long as we stop at a page boundary. This simplifies the logic.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Reviewed-by: Bob Peterson <rpeterso@redhat.com>1 parent 9cb1fd0 commit 20be493
1 file changed
Lines changed: 5 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
509 | 509 | | |
510 | 510 | | |
511 | 511 | | |
512 | | - | |
| 512 | + | |
513 | 513 | | |
514 | 514 | | |
515 | 515 | | |
516 | 516 | | |
517 | | - | |
| 517 | + | |
518 | 518 | | |
519 | 519 | | |
520 | 520 | | |
| |||
537 | 537 | | |
538 | 538 | | |
539 | 539 | | |
540 | | - | |
541 | | - | |
542 | | - | |
543 | | - | |
| 540 | + | |
544 | 541 | | |
545 | 542 | | |
546 | 543 | | |
| |||
553 | 550 | | |
554 | 551 | | |
555 | 552 | | |
556 | | - | |
557 | 553 | | |
558 | 554 | | |
559 | 555 | | |
560 | 556 | | |
561 | 557 | | |
562 | | - | |
| 558 | + | |
563 | 559 | | |
564 | 560 | | |
565 | 561 | | |
566 | 562 | | |
567 | 563 | | |
568 | | - | |
569 | 564 | | |
570 | 565 | | |
571 | 566 | | |
572 | 567 | | |
573 | 568 | | |
574 | 569 | | |
575 | 570 | | |
576 | | - | |
| 571 | + | |
577 | 572 | | |
578 | 573 | | |
579 | 574 | | |
| |||
0 commit comments