• Neil Brown's avatar
    [PATCH] md: assorted fixes/improvemnet to generic md resync code. · 32c31806
    Neil Brown authored
    1/ Introduce "mddev->resync_max_sectors" so that an md personality
    can ask for resync to cover a different address range than that of a
    single drive.  raid10 will use this.
    
    2/ fix is_mddev_idle so that if there seem to be a negative number
     of events, it doesn't immediately assume activity.
    
    3/ make "sync_io" (the count of IO sectors used for array resync)
     an atomic_t to avoid SMP races. 
    
    4/ Pass md_sync_acct a "block_device" rather than the containing "rdev",
      as the whole rdev isn't needed. Also make this an inline function.
    
    5/ Make sure recovery gets interrupted on any error.
    Signed-off-by: default avatarNeil Brown <neilb@cse.unsw.edu.au>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    32c31806
md.c 88.3 KB