]> git.baikalelectronics.ru Git - kernel.git/commit
Restore partition detection of newly created md arrays.
authorNeilBrown <neilb@suse.de>
Thu, 24 Jun 2010 03:31:03 +0000 (13:31 +1000)
committerNeilBrown <neilb@suse.de>
Thu, 24 Jun 2010 03:31:03 +0000 (13:31 +1000)
commitc96750d94e6770981017b7ab5ae4546b87c593d5
treec9e59617e67e7a43e38b5c41f3307d54f4279c13
parenta05552eb058caba6e4fae1ea274cb90883c6f8eb
Restore partition detection of newly created md arrays.

Commit  f725021142a918325188c54f7f555eb324bbcb37 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: Duncan <1i5t5.duncan@cox.net>
Reported-by: Duncan <1i5t5.duncan@cox.net>
Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/md.c