• Artur Paszkiewicz's avatar
    raid5-ppl: runtime PPL enabling or disabling · ba903a3e
    Artur Paszkiewicz authored
    Allow writing to 'consistency_policy' attribute when the array is
    active. Add a new function 'change_consistency_policy' to the
    md_personality operations structure to handle the change in the
    personality code. Values "ppl" and "resync" are accepted and
    turn PPL on and off respectively.
    
    When enabling PPL its location and size should first be set using
    'ppl_sector' and 'ppl_size' attributes and a valid PPL header should be
    written at this location on each member device.
    
    Enabling or disabling PPL is performed under a suspended array.  The
    raid5_reset_stripe_cache function frees the stripe cache and allocates
    it again in order to allocate or free the ppl_pages for the stripes in
    the stripe cache.
    Signed-off-by: default avatarArtur Paszkiewicz <artur.paszkiewicz@intel.com>
    Signed-off-by: default avatarShaohua Li <shli@fb.com>
    ba903a3e
raid5-ppl.c 34.9 KB