• Neil Brown's avatar
    [PATCH] MD - Set desc_nr more sanely. · 999a2029
    Neil Brown authored
    Set desc_nr more sanely.
    
    Currently rdev->desc_nr is set in sync_sbs which is typcially
    called just before writing out the superblocks, which is an
    odd place to set it.
    It is also called when a new disk is added (which is sane) and
    when an old disc is imported ... which is quesitonable.
    
    With this patch it is set when a new disk is added, and when
    the superblocks are being analysed, which makes lots of sense.
    
    MULTIPATH is particularly an issue here.  The old code tried
    to figure the desc_nr for an rdev by matching device numbers in
    the superblock.  This doesn't make a lot of sense as
    device numbers can change.  Now MULTIPATH components
    get sequential desc_nrs.
    999a2029
md.c 85.1 KB