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