Commit 2c27d09
md/raid1: record nonrot rdevs while adding/removing rdevs to conf
For raid1, each read will iterate all the rdevs from conf and check if
any rdev is non-rotational, then choose rdev with minimal IO inflight
if so, or rdev with closest distance otherwise.
Disk nonrot info can be changed through sysfs entry:
/sys/block/[disk_name]/queue/rotational
However, consider that this should only be used for testing, and user
really shouldn't do this in real life. Record the number of non-rotational
disks in conf, to avoid checking each rdev in IO fast path and simplify
read_balance() a little bit.
Co-developed-by: Paul Luse <paul.e.luse@linux.intel.com>
Signed-off-by: Paul Luse <paul.e.luse@linux.intel.com>
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Signed-off-by: Song Liu <song@kernel.org>
Link: https://lore.kernel.org/r/20240229095714.926789-4-yukuai1@huaweicloud.com1 parent 969d658 commit 2c27d09
3 files changed
Lines changed: 12 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
| 210 | + | |
210 | 211 | | |
211 | 212 | | |
212 | 213 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
599 | 599 | | |
600 | 600 | | |
601 | 601 | | |
602 | | - | |
603 | 602 | | |
604 | 603 | | |
605 | 604 | | |
| |||
620 | 619 | | |
621 | 620 | | |
622 | 621 | | |
623 | | - | |
624 | 622 | | |
625 | 623 | | |
626 | 624 | | |
| |||
637 | 635 | | |
638 | 636 | | |
639 | 637 | | |
640 | | - | |
641 | 638 | | |
642 | 639 | | |
643 | 640 | | |
| |||
703 | 700 | | |
704 | 701 | | |
705 | 702 | | |
706 | | - | |
707 | | - | |
708 | 703 | | |
709 | 704 | | |
710 | 705 | | |
| |||
731 | 726 | | |
732 | 727 | | |
733 | 728 | | |
734 | | - | |
| 729 | + | |
735 | 730 | | |
736 | 731 | | |
737 | 732 | | |
| |||
763 | 758 | | |
764 | 759 | | |
765 | 760 | | |
766 | | - | |
| 761 | + | |
767 | 762 | | |
768 | 763 | | |
769 | 764 | | |
| |||
1768 | 1763 | | |
1769 | 1764 | | |
1770 | 1765 | | |
| 1766 | + | |
| 1767 | + | |
| 1768 | + | |
| 1769 | + | |
| 1770 | + | |
1771 | 1771 | | |
1772 | 1772 | | |
1773 | 1773 | | |
| |||
1791 | 1791 | | |
1792 | 1792 | | |
1793 | 1793 | | |
| 1794 | + | |
| 1795 | + | |
| 1796 | + | |
1794 | 1797 | | |
1795 | 1798 | | |
1796 | 1799 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
74 | 75 | | |
75 | 76 | | |
76 | 77 | | |
| |||
0 commit comments