• N
    md/raid5 revise rules for when to update metadata during reshape · c8f517c4
    NeilBrown 提交于
    We currently update the metadata :
     1/ every 3Megabytes
     2/ When the place we will write new-layout data to is recorded in
        the metadata as still containing old-layout data.
    
    Rule one exists to avoid having to re-do too much reshaping in the
    face of a crash/restart.  So it should really be time based rather
    than size based.  So change it to "every 10 seconds".
    
    Rule two turns out to be too harsh when restriping an array
    'in-place', as in that case the metadata much be updates for every
    stripe.
    For the in-place update, it can only possibly be safe from a crash if
    some user-space program data a backup of every e.g. few hundred
    stripes before allowing them to be reshaped.  In that case, the
    constant metadata update is pointless.
    So only update the metadata if the new metadata will report that the
    end of the 'old-layout' data is beyond where we are currently
    writing 'new-layout' data.
    Signed-off-by: NNeilBrown <neilb@suse.de>
    c8f517c4
raid5.c 148.7 KB