Commit b0ee9b7
committed
md: add legacy_async_del_gendisk mode
JIRA: https://issues.redhat.com/browse/RHEL-94433
JIRA: https://issues.redhat.com/browse/RHEL-20191
JIRA: https://issues.redhat.com/browse/RHEL-9656
commit 25db5f2
Author: Xiao Ni <xni@redhat.com>
Date: Wed Aug 13 11:29:29 2025 +0800
md: add legacy_async_del_gendisk mode
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>
Signed-off-by: Nigel Croxon <ncroxon@redhat.com>1 parent 3dc6645 commit b0ee9b7
1 file changed
+42
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
340 | 340 | | |
341 | 341 | | |
342 | 342 | | |
| 343 | + | |
343 | 344 | | |
344 | 345 | | |
345 | 346 | | |
| |||
878 | 879 | | |
879 | 880 | | |
880 | 881 | | |
881 | | - | |
882 | | - | |
883 | | - | |
884 | | - | |
885 | | - | |
886 | | - | |
887 | | - | |
888 | | - | |
889 | | - | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
890 | 894 | | |
891 | 895 | | |
892 | 896 | | |
| |||
5844 | 5848 | | |
5845 | 5849 | | |
5846 | 5850 | | |
| 5851 | + | |
| 5852 | + | |
| 5853 | + | |
| 5854 | + | |
| 5855 | + | |
| 5856 | + | |
| 5857 | + | |
5847 | 5858 | | |
5848 | 5859 | | |
5849 | 5860 | | |
| |||
6047 | 6058 | | |
6048 | 6059 | | |
6049 | 6060 | | |
| 6061 | + | |
| 6062 | + | |
| 6063 | + | |
6050 | 6064 | | |
6051 | 6065 | | |
6052 | 6066 | | |
| |||
6457 | 6471 | | |
6458 | 6472 | | |
6459 | 6473 | | |
6460 | | - | |
6461 | | - | |
6462 | | - | |
6463 | | - | |
| 6474 | + | |
| 6475 | + | |
| 6476 | + | |
| 6477 | + | |
| 6478 | + | |
| 6479 | + | |
| 6480 | + | |
| 6481 | + | |
| 6482 | + | |
| 6483 | + | |
| 6484 | + | |
| 6485 | + | |
| 6486 | + | |
| 6487 | + | |
| 6488 | + | |
| 6489 | + | |
6464 | 6490 | | |
6465 | 6491 | | |
6466 | 6492 | | |
| |||
6684 | 6710 | | |
6685 | 6711 | | |
6686 | 6712 | | |
6687 | | - | |
| 6713 | + | |
| 6714 | + | |
6688 | 6715 | | |
6689 | 6716 | | |
6690 | 6717 | | |
| |||
10418 | 10445 | | |
10419 | 10446 | | |
10420 | 10447 | | |
| 10448 | + | |
10421 | 10449 | | |
10422 | 10450 | | |
10423 | 10451 | | |
| |||
0 commit comments