Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b347af81 authored by Song Liu's avatar Song Liu Committed by Shaohua Li
Browse files

md: do not count journal as spare in GET_ARRAY_INFO



GET_ARRAY_INFO counts journal as spare (spare_disks), which is not
accurate. This patch fixes this.

Reported-by: default avatarYi Zhang <yizhan@redhat.com>
Signed-off-by: default avatarSong Liu <songliubraving@fb.com>
Signed-off-by: default avatarShaohua Li <shli@fb.com>
parent 11367799
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -5851,6 +5851,9 @@ static int get_array_info(struct mddev *mddev, void __user *arg)
			working++;
			if (test_bit(In_sync, &rdev->flags))
				insync++;
			else if (test_bit(Journal, &rdev->flags))
				/* TODO: add journal count to md_u.h */
				;
			else
				spare++;
		}