md: fix max sectors calculation for super 1.0
To grow size of super 1.0 raid array, it is necessary to check the device max usable size. Now it uses rdev->sectors for max usable size. If one disk is 500G and the raid device only uses the 100GB of this disk. rdev->sectors can't tell the real max usable size. The max usable size should be dev_size-(superblock_size+bitmap_size+badblock_size). Also, remove unnecessary sb_start update in super_1_rdev_size_change(). Signed-off-by:Xiao Ni <xni@redhat.com> Signed-off-by:
Song Liu <songliubraving@fb.com>
parent
a9e8e18a
Please register or sign in to comment