From: Song Liu Date: Fri, 12 Aug 2016 00:14:45 +0000 (-0700) Subject: md: do not count journal as spare in GET_ARRAY_INFO X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=b347af816ad2086c1dacf9f74973b82f83e877be;p=deliverable%2Flinux.git 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: Yi Zhang Signed-off-by: Song Liu Signed-off-by: Shaohua Li --- diff --git a/drivers/md/md.c b/drivers/md/md.c index 2c3ab6f5e6be..d750b52376b9 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -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++; }