Skip to content
Commit f3b99be1 authored by NeilBrown's avatar NeilBrown
Browse files

Restore partition detection of newly created md arrays.

Commit  b821eaa5

 broke partition
detection for md arrays.

The logic was almost right.  However if revalidate_disk is called
when the device is not yet open, bdev->bd_disk won't be set, so the
flush_disk() Call will not set bd_invalidated.

So when md_open is called we still need to ensure that
->bd_invalidated gets set.  This is easily done with a call to
check_disk_size_change in the place where the offending commit removed
check_disk_change.  At the important times, the size will have changed
from 0 to non-zero, so check_disk_size_change will set bd_invalidated.

Tested-by: default avatarDuncan <1i5t5.duncan@cox.net>
Reported-by: default avatarDuncan <1i5t5.duncan@cox.net>
Signed-off-by: default avatarNeilBrown <neilb@suse.de>
parent 7e27d6e7
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment