md: make sure GET_ARRAY_INFO ioctl reports correct "clean" status
If an array has a bitmap, the when we set the "has bitmap" flag we
incorrectly clear the "is clean" flag.
"is clean" isn't really important when a bitmap is present, but it is
best to get it right anyway.
Reported-by: George Duffield <forumscollective@gmail.com>
Link: http://lkml.kernel.org/CAG__1a4MRV6gJL38XLAurtoSiD3rLBTmWpcS5HYvPpSfPR88UQ@mail.gmail.com
Fixes: 36fa30636f
(v2.6.14)
Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
parent
4c834452aa
commit
9bd3592032
|
@ -5599,7 +5599,7 @@ static int get_array_info(struct mddev * mddev, void __user * arg)
|
||||||
if (mddev->in_sync)
|
if (mddev->in_sync)
|
||||||
info.state = (1<<MD_SB_CLEAN);
|
info.state = (1<<MD_SB_CLEAN);
|
||||||
if (mddev->bitmap && mddev->bitmap_info.offset)
|
if (mddev->bitmap && mddev->bitmap_info.offset)
|
||||||
info.state = (1<<MD_SB_BITMAP_PRESENT);
|
info.state |= (1<<MD_SB_BITMAP_PRESENT);
|
||||||
info.active_disks = insync;
|
info.active_disks = insync;
|
||||||
info.working_disks = working;
|
info.working_disks = working;
|
||||||
info.failed_disks = failed;
|
info.failed_disks = failed;
|
||||||
|
|
Loading…
Reference in New Issue