• Neil Brown's avatar
    [PATCH] md: Remove MD_SB_DISKS limits from raid1 · 31458043
    Neil Brown authored
    raid1 uses MD_SB_DISKS to size two data structures,
    but the new version-1 superblock allows for more than
    this number of disks (and most actual arrays use many
    fewer).
    This patch sizes to two arrays dynamically.
    One becomes a separate kmalloced array.
    The other is moved to the end of the containing structure
    and appropriate extra space is allocated.
    
    Also, change r1buf_pool_alloc (which allocates buffers for
    a mempool for doing re-sync) to not get r1bio structures
    from the r1bio pool (which could exhaust the pool) but instead
    to allocate them separately.
    31458043
raid1.c 29.7 KB