• Heinz Mauelshagen's avatar
    dm raid: fix rs_get_progress() synchronization state/ratio · 4102d9de
    Heinz Mauelshagen authored
    Fix various sync state issues causing racy/bogus sync ratio,
    sync_action ad health chars in dm_status() info output.
    
    Sync ratio could be N/N (i.e. 100%) shortly after raid set
    creation, i.e. creating a new RaidLV or upconverting a linear LV to
    raid1 thus:
      "0 2097152 raid raid1 2 Aa 2097162/2097152 recover 0 0 -"
    instead of:
      "0 2097152 raid raid1 2 Aa 0/2097152 idle 0 0 -"
    
    Sync action could be non-idle, when the MD thread was done with io.
    
    Health chars could be 'A' when they should be 'a' for a short time
    before a resynchonization started.
    Signed-off-by: default avatarHeinz Mauelshagen <heinzm@redhat.com>
    Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
    4102d9de
dm-raid.c 116 KB