Re: [mdadm PATCH] Incremental: Use ->validate_geometry instead of ->avail_size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/30/2017 12:43 AM, NeilBrown wrote:
> 
> Since mdadm 3.3 is has not been correct to call ->avail_size if
> metadata hasn't been read from the device.  ->validate_geometry
> should be used instead.
> 
> Unfortunately array_try_spare() didn't get the memo, and it can crash
> when adding a spare with no metdata.
> 
> So change it to use ->validate_geometry().
> 
> Only one place remains that uses ->avail_size(), and that is safe.
> 
> Also fix a comment with a typo.
> 
> Reported-and-tested-by: Bjørnar Ness <bjornar.ness@xxxxxxxxx>
> Fixes: 641da7459192 ("super1: separate to version of _avail_space1().")
> Signed-off-by: NeilBrown <neilb@xxxxxxxx>
> ---
>  Incremental.c | 15 +++++++++------
>  1 file changed, 9 insertions(+), 6 deletions(-)

Memo sent to array_try_spare()!

Thanks,
Jes


--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux