Commit b743bd9
Ming Lei
md: improve return types of badblocks handling functions
JIRA: https://issues.redhat.com/browse/RHEL-106845
commit 7e5102d
Author: Zheng Qixing <zhengqixing@huawei.com>
Date: Thu Feb 27 15:55:06 2025 +0800
md: improve return types of badblocks handling functions
rdev_set_badblocks() only indicates success/failure, so convert its return
type from int to boolean for better semantic clarity.
rdev_clear_badblocks() return value is never used by any caller, convert it
to void. This removes unnecessary value returns.
Also update narrow_write_error() in both raid1 and raid10 to use boolean
return type to match rdev_set_badblocks().
Signed-off-by: Zheng Qixing <zhengqixing@huawei.com>
Reviewed-by: Yu Kuai <yukuai3@huawei.com>
Link: https://lore.kernel.org/r/20250227075507.151331-12-zhengqixing@huaweicloud.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Ming Lei <ming.lei@redhat.com>1 parent 8339589 commit b743bd9
4 files changed
+19
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9909 | 9909 | | |
9910 | 9910 | | |
9911 | 9911 | | |
9912 | | - | |
9913 | | - | |
9914 | | - | |
| 9912 | + | |
| 9913 | + | |
| 9914 | + | |
9915 | 9915 | | |
9916 | 9916 | | |
9917 | 9917 | | |
| |||
9923 | 9923 | | |
9924 | 9924 | | |
9925 | 9925 | | |
9926 | | - | |
| 9926 | + | |
9927 | 9927 | | |
9928 | 9928 | | |
9929 | 9929 | | |
9930 | 9930 | | |
9931 | 9931 | | |
9932 | 9932 | | |
9933 | 9933 | | |
9934 | | - | |
| 9934 | + | |
9935 | 9935 | | |
9936 | 9936 | | |
9937 | 9937 | | |
| |||
9940 | 9940 | | |
9941 | 9941 | | |
9942 | 9942 | | |
9943 | | - | |
| 9943 | + | |
9944 | 9944 | | |
9945 | 9945 | | |
9946 | 9946 | | |
9947 | | - | |
9948 | | - | |
| 9947 | + | |
| 9948 | + | |
9949 | 9949 | | |
9950 | 9950 | | |
9951 | 9951 | | |
9952 | 9952 | | |
9953 | 9953 | | |
9954 | 9954 | | |
9955 | 9955 | | |
9956 | | - | |
| 9956 | + | |
9957 | 9957 | | |
9958 | 9958 | | |
9959 | 9959 | | |
9960 | | - | |
9961 | 9960 | | |
9962 | 9961 | | |
9963 | 9962 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
315 | 315 | | |
316 | 316 | | |
317 | 317 | | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
322 | 322 | | |
323 | 323 | | |
324 | 324 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2490 | 2490 | | |
2491 | 2491 | | |
2492 | 2492 | | |
2493 | | - | |
| 2493 | + | |
2494 | 2494 | | |
2495 | 2495 | | |
2496 | 2496 | | |
| |||
2511 | 2511 | | |
2512 | 2512 | | |
2513 | 2513 | | |
2514 | | - | |
| 2514 | + | |
2515 | 2515 | | |
2516 | 2516 | | |
2517 | | - | |
| 2517 | + | |
2518 | 2518 | | |
2519 | 2519 | | |
2520 | 2520 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2779 | 2779 | | |
2780 | 2780 | | |
2781 | 2781 | | |
2782 | | - | |
| 2782 | + | |
2783 | 2783 | | |
2784 | 2784 | | |
2785 | 2785 | | |
| |||
2800 | 2800 | | |
2801 | 2801 | | |
2802 | 2802 | | |
2803 | | - | |
| 2803 | + | |
2804 | 2804 | | |
2805 | 2805 | | |
2806 | | - | |
| 2806 | + | |
2807 | 2807 | | |
2808 | 2808 | | |
2809 | 2809 | | |
| |||
0 commit comments