Skip to content
  • Iustin Pop's avatar
    Cleanup LV status computation · 99e8295c
    Iustin Pop authored
    Currently, when seeing if a LV is degraded or not (i.e. virtual volume),
    we first attach to the device (which does an lvdisplay), then do a lvs
    in order to display the lv_attr. This generates two external commands to
    do (almost) the same thing.
    
    This patch changes the Attach() method for LVs to call lvs and display
    both the major/minor (needed for attach) and the lv_status (needed for
    GetSyncStatus). Thus, later in GetSyncStatus, we don't need to run lvs
    again, and instead just return the value computed in Attach().
    
    Reviewed-by: imsnah
    99e8295c