Commit 432db83
committed
md: add legacy_async_del_gendisk mode
JIRA: https://issues.redhat.com/browse/RHEL-123668
commit 9e59d60 ("md: call del_gendisk in control path") changes the
async way to sync way of calling del_gendisk. But it breaks mdadm
--assemble command. The assemble command runs like this:
1. create the array
2. stop the array
3. access the sysfs files after stopping
The sync way calls del_gendisk in step 2, so all sysfs files are removed.
Now to avoid breaking mdadm assemble command, this patch adds the parameter
legacy_async_del_gendisk that can be used to choose which way. The default
is async way. In future, we plan to change default to sync way in kernel
7.0. Then users need to upgrade to mdadm 4.5+ which removes step 2.
Fixes: 9e59d60 ("md: call del_gendisk in control path")
Reported-by: Mikulas Patocka <mpatocka@redhat.com>
Closes: https://lore.kernel.org/linux-raid/CAMw=ZnQ=ET2St-+hnhsuq34rRPnebqcXqP1QqaHW5Bh4aaaZ4g@mail.gmail.com/T/#t
Suggested-and-reviewed-by: Yu Kuai <yukuai3@huawei.com>
Signed-off-by: Xiao Ni <xni@redhat.com>
Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
Link: https://lore.kernel.org/linux-raid/20250813032929.54978-1-xni@redhat.com
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
(cherry picked from commit 25db5f2)
Signed-off-by: Nigel Croxon <ncroxon@redhat.com>1 parent 0276108 commit 432db83
1 file changed
+42
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
339 | 339 | | |
340 | 340 | | |
341 | 341 | | |
| 342 | + | |
342 | 343 | | |
343 | 344 | | |
344 | 345 | | |
| |||
877 | 878 | | |
878 | 879 | | |
879 | 880 | | |
880 | | - | |
881 | | - | |
882 | | - | |
883 | | - | |
884 | | - | |
885 | | - | |
886 | | - | |
887 | | - | |
888 | | - | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
889 | 893 | | |
890 | 894 | | |
891 | 895 | | |
| |||
5877 | 5881 | | |
5878 | 5882 | | |
5879 | 5883 | | |
| 5884 | + | |
| 5885 | + | |
| 5886 | + | |
| 5887 | + | |
| 5888 | + | |
| 5889 | + | |
| 5890 | + | |
5880 | 5891 | | |
5881 | 5892 | | |
5882 | 5893 | | |
| |||
6085 | 6096 | | |
6086 | 6097 | | |
6087 | 6098 | | |
| 6099 | + | |
| 6100 | + | |
| 6101 | + | |
6088 | 6102 | | |
6089 | 6103 | | |
6090 | 6104 | | |
| |||
6498 | 6512 | | |
6499 | 6513 | | |
6500 | 6514 | | |
6501 | | - | |
6502 | | - | |
6503 | | - | |
6504 | | - | |
| 6515 | + | |
| 6516 | + | |
| 6517 | + | |
| 6518 | + | |
| 6519 | + | |
| 6520 | + | |
| 6521 | + | |
| 6522 | + | |
| 6523 | + | |
| 6524 | + | |
| 6525 | + | |
| 6526 | + | |
| 6527 | + | |
| 6528 | + | |
| 6529 | + | |
| 6530 | + | |
6505 | 6531 | | |
6506 | 6532 | | |
6507 | 6533 | | |
| |||
6728 | 6754 | | |
6729 | 6755 | | |
6730 | 6756 | | |
6731 | | - | |
| 6757 | + | |
| 6758 | + | |
6732 | 6759 | | |
6733 | 6760 | | |
6734 | 6761 | | |
| |||
10466 | 10493 | | |
10467 | 10494 | | |
10468 | 10495 | | |
| 10496 | + | |
10469 | 10497 | | |
10470 | 10498 | | |
10471 | 10499 | | |
| |||
0 commit comments