Commit 511092c
block: use chunk_sectors when evaluating stacked atomic write limits
The atomic write unit max value is limited by any stacked device stripe
size.
It is required that the atomic write unit is a power-of-2 factor of the
stripe size.
Currently we use io_min limit to hold the stripe size, and check for a
io_min <= SECTOR_SIZE when deciding if we have a striped stacked device.
Nilay reports that this causes a problem when the physical block size is
greater than SECTOR_SIZE [0].
Furthermore, io_min may be mutated when stacking devices, and this makes
it a poor candidate to hold the stripe size. Such an example (of when
io_min may change) would be when the io_min is less than the physical
block size.
Use chunk_sectors to hold the stripe size, which is more appropriate.
[0] https://lore.kernel.org/linux-block/[email protected]/T/#mecca17129f72811137d3c2f1e477634e77f06781
Reviewed-by: Nilay Shroff <[email protected]>
Tested-by: Nilay Shroff <[email protected]>
Signed-off-by: John Garry <[email protected]>1 parent 15cd6e8 commit 511092c
1 file changed
Lines changed: 33 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
594 | 594 | | |
595 | 595 | | |
596 | 596 | | |
597 | | - | |
598 | | - | |
599 | | - | |
600 | | - | |
| 597 | + | |
601 | 598 | | |
602 | | - | |
603 | | - | |
604 | | - | |
| 599 | + | |
605 | 600 | | |
606 | | - | |
607 | | - | |
608 | | - | |
609 | | - | |
610 | | - | |
611 | | - | |
612 | | - | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
613 | 611 | | |
614 | 612 | | |
615 | 613 | | |
616 | 614 | | |
617 | | - | |
| 615 | + | |
618 | 616 | | |
619 | 617 | | |
620 | | - | |
621 | | - | |
622 | | - | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
623 | 621 | | |
624 | | - | |
625 | | - | |
626 | | - | |
| 622 | + | |
| 623 | + | |
627 | 624 | | |
628 | | - | |
| 625 | + | |
629 | 626 | | |
630 | | - | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
631 | 637 | | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
632 | 641 | | |
633 | 642 | | |
634 | 643 | | |
| |||
656 | 665 | | |
657 | 666 | | |
658 | 667 | | |
| 668 | + | |
659 | 669 | | |
660 | 670 | | |
661 | 671 | | |
| |||
0 commit comments