• Neil Brown's avatar
    [PATCH] Fix raid1 handling of writing to multiple devices. · 1e23fe7d
    Neil Brown authored
    When raid1 writes, it needs to schedule writes to some number
    of devices, and when all writes have completed, the r1_bio
    structure that holds it all together must be freed.
    However we must make sure not to free it before all devices
    have been considered for submitting writes to.
    
    This happens in two places: when submitting a normal write request
    and when submiting a write as part of resync.
    
    This patch makes both these places:
      the same
      simpler
      more correct.
    1e23fe7d
raid1.c 28.6 KB