Commit 2c33fa6
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 8096192 commit 2c33fa6
1 file changed
Lines changed: 33 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
595 | 595 | | |
596 | 596 | | |
597 | 597 | | |
598 | | - | |
599 | | - | |
600 | | - | |
601 | | - | |
| 598 | + | |
602 | 599 | | |
603 | | - | |
604 | | - | |
605 | | - | |
| 600 | + | |
606 | 601 | | |
607 | | - | |
608 | | - | |
609 | | - | |
610 | | - | |
611 | | - | |
612 | | - | |
613 | | - | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
614 | 612 | | |
615 | 613 | | |
616 | 614 | | |
617 | 615 | | |
618 | | - | |
| 616 | + | |
619 | 617 | | |
620 | 618 | | |
621 | | - | |
622 | | - | |
623 | | - | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
624 | 622 | | |
625 | | - | |
626 | | - | |
627 | | - | |
| 623 | + | |
| 624 | + | |
628 | 625 | | |
629 | | - | |
| 626 | + | |
630 | 627 | | |
631 | | - | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
632 | 638 | | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
633 | 642 | | |
634 | 643 | | |
635 | 644 | | |
| |||
657 | 666 | | |
658 | 667 | | |
659 | 668 | | |
| 669 | + | |
660 | 670 | | |
661 | 671 | | |
662 | 672 | | |
| |||
0 commit comments