else if (lv_is_cache_type(lv))
repstr[0] = 'C';
else if (lv_is_raid(lv))
- repstr[0] = (lv->status & LV_NOTSYNCED) ? 'R' : 'r';
+ repstr[0] = (lv_is_not_synced(lv)) ? 'R' : 'r';
else if (lv_is_mirror(lv))
- repstr[0] = (lv->status & LV_NOTSYNCED) ? 'M' : 'm';
+ repstr[0] = (lv_is_not_synced(lv)) ? 'M' : 'm';
else if (lv_is_thin_volume(lv))
repstr[0] = lv_is_merging_origin(lv) ?
'O' : (lv_is_merging_thin_snapshot(lv) ? 'S' : 'V');
*/
if (old_extents &&
segtype_is_mirrored(segtype) &&
- (lv->status & LV_NOTSYNCED)) {
+ (lv_is_not_synced(lv))) {
dm_percent_t sync_percent = DM_PERCENT_INVALID;
if (!lv_is_active_locally(lv)) {
#define lv_is_mirror_log(lv) (((lv)->status & MIRROR_LOG) ? 1 : 0)
#define lv_is_mirror(lv) (((lv)->status & MIRROR) ? 1 : 0)
#define lv_is_mirror_type(lv) (((lv)->status & (MIRROR | MIRROR_LOG | MIRROR_IMAGE)) ? 1 : 0)
+#define lv_is_not_synced(lv) (((lv)->status & LV_NOTSYNCED) ? 1 : 0)
#define lv_is_pending_delete(lv) (((lv)->status & LV_PENDING_DELETE) ? 1 : 0)
#define lv_is_error_when_full(lv) (((lv)->status & LV_ERROR_WHEN_FULL) ? 1 : 0)
struct lv_list *lvl;
struct lv_segment_area *new_areas;
- if (lv->status & LV_NOTSYNCED) {
+ if (lv_is_not_synced(lv)) {
log_error("Can't add image to out-of-sync RAID LV:"
" use 'lvchange --resync' first.");
return 0;
int initial_image_sync;
if (lv_is_raid(lv) || lv_is_mirrored(lv))
- initial_image_sync = (lv->status & LV_NOTSYNCED) == 0;
+ initial_image_sync = !lv_is_not_synced(lv);
else
initial_image_sync = 0;
* worry about persistent logs.
*/
if (!seg_is_raid(seg) && !seg->log_lv) {
- if (lv->status & LV_NOTSYNCED) {
+ if (lv_is_not_synced(lv)) {
lv->status &= ~LV_NOTSYNCED;
log_very_verbose("Updating logical volume %s on disk(s).",
display_lvname(lv));
* Up-convert m-way mirror to n-way mirror
*/
if (new_mimage_count > old_mimage_count) {
- if (lv->status & LV_NOTSYNCED) {
+ if (lv_is_not_synced(lv)) {
log_error("Can't add mirror to out-of-sync mirrored "
"LV: use lvchange --resync first.");
return 0;