On 12/17/21 10:00 AM, Guoqing Jiang wrote:
+static inline bool is_rdev_broken(struct md_rdev *rdev)
{
- if (!disk_live(rdev->bdev->bd_disk)) {
- if (!test_and_set_bit(MD_BROKEN, &rdev->mddev->flags))
- pr_warn("md: %s: %s array has a missing/failed member\n",
- mdname(rdev->mddev), md_type);
- return true;
- }
- return false;
+ return !disk_live(rdev->bdev->bd_disk);
}
Besides, if MD_BROKEN is not set here then I think you can also delete
the
flag from other places as well.
Oops, I didn't notice the flag is set elsewhere.
Thanks,
Guoqing