Skip to content

Commit 9bd3592

Browse files
committed
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 <[email protected]> Link: http://lkml.kernel.org/CAG__1a4MRV6gJL38XLAurtoSiD3rLBTmWpcS5HYvPpSfPR88UQ@mail.gmail.com Fixes: 36fa306 (v2.6.14) Signed-off-by: NeilBrown <[email protected]>
1 parent 4c83445 commit 9bd3592

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/md/md.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5599,7 +5599,7 @@ static int get_array_info(struct mddev * mddev, void __user * arg)
55995599
if (mddev->in_sync)
56005600
info.state = (1<<MD_SB_CLEAN);
56015601
if (mddev->bitmap && mddev->bitmap_info.offset)
5602-
info.state = (1<<MD_SB_BITMAP_PRESENT);
5602+
info.state |= (1<<MD_SB_BITMAP_PRESENT);
56035603
info.active_disks = insync;
56045604
info.working_disks = working;
56055605
info.failed_disks = failed;

0 commit comments

Comments
 (0)