diff options
author | Song Liu <songliubraving@fb.com> | 2016-08-11 20:14:45 -0400 |
---|---|---|
committer | Shaohua Li <shli@fb.com> | 2016-08-16 21:34:15 -0400 |
commit | b347af816ad2086c1dacf9f74973b82f83e877be (patch) | |
tree | 64663c861e4f6504ecd506711f11dc63af9e4eb3 | |
parent | 11367799f3d12a5074c4a3c0fa4ea8da2a21a2a4 (diff) |
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 <yizhan@redhat.com>
Signed-off-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Shaohua Li <shli@fb.com>
-rw-r--r-- | drivers/md/md.c | 3 |
1 files changed, 3 insertions, 0 deletions
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) | |||
5851 | working++; | 5851 | working++; |
5852 | if (test_bit(In_sync, &rdev->flags)) | 5852 | if (test_bit(In_sync, &rdev->flags)) |
5853 | insync++; | 5853 | insync++; |
5854 | else if (test_bit(Journal, &rdev->flags)) | ||
5855 | /* TODO: add journal count to md_u.h */ | ||
5856 | ; | ||
5854 | else | 5857 | else |
5855 | spare++; | 5858 | spare++; |
5856 | } | 5859 | } |