• Andrew Morton's avatar
    [PATCH] md: Avoid unnecessary bio allocation during raid1 resync · 89654f5b
    Andrew Morton authored
    From: NeilBrown <neilb@cse.unsw.edu.au>
    
    For each resync request, we allocate a "r1_bio" which has a bio "master_bio"
    attached that goes largely unused.  We also allocate a read_bio which is
    used.  This patch removes the read_bio and just uses the master_bio instead.
    
    This fixes a bug wherein bi_bdev of the master_bio wasn't being set, but was
    being used.
    
    We also introduce a new "sectors" field into the r1_bio as we can no-longer
    rely in master_bio->bi_sectors.
    89654f5b
raid1.c 30 KB