goto_out;
dm_list_iterate_items(ll, &vg->lvs) {
- if (ll->lv->status & SNAPSHOT)
+ if (lv_is_snapshot(ll->lv))
continue;
if (!(lvdl = dm_pool_alloc(dl->mem, sizeof(*lvdl))))
}
dm_list_iterate_items(ll, &vg->lvs) {
- if (ll->lv->status & SNAPSHOT)
+ if (lv_is_snapshot(ll->lv))
continue;
if (!(lvm = dm_pool_alloc(mem, sizeof(*lvm))))
dm_list_iterate_items(lvl, lvs) {
lv = lvl->lv;
- if (lv->status & SNAPSHOT)
+ if (lv_is_snapshot(lv))
continue;
for (i = 0; i < subpools; i++) {
count++;
}
/* FIXME Remove this restriction */
- if ((lv->status & SNAPSHOT) && count > 1) {
+ if (lv_is_snapshot(lv) && count > 1) {
log_error("Only one segment permitted for snapshot");
return 0;
}
if (lv_is_cow(lv))
return 0;
- if (lv->status & SNAPSHOT)
+ if (lv_is_snapshot(lv))
return 0;
/* FIXME: lv_is_virtual_origin ? */
struct lv_segment *seg = first_seg(lv);
struct lv_segment *mirror_seg;
- if (!(lv->status & MIRROR_IMAGE) || !seg ||
+ if (!lv_is_mirror_image(lv) || !seg ||
!(mirror_seg = find_mirror_seg(seg))) {
log_error(INTERNAL_ERROR "Cannot find mirror segment.");
return 0;
display_lvname(seg->lv), seg->le, area_num,
display_lvname(lv), le);
- if (status & RAID_META) {
+ lv->status |= status;
+ if (lv_is_raid_metadata(lv)) {
seg->meta_areas[area_num].type = AREA_LV;
seg_metalv(seg, area_num) = lv;
if (le) {
seg_lv(seg, area_num) = lv;
seg_le(seg, area_num) = le;
}
- lv->status |= status;
if (!add_seg_to_segs_using_this_lv(lv, seg))
return_0;
if (lv_is_raid_image(lv) || lv_is_raid_metadata(lv)) {
log_error("Cannot resize a RAID %s directly",
- (lv->status & RAID_IMAGE) ? "image" :
- "metadata area");
+ lv_is_raid_image(lv) ? "image" : "metadata area");
return 0;
}
*tracking = NULL;
- if (!(lv->status & RAID))
+ if (!lv_is_raid(lv))
return 0;
for (s = 0; s < seg->area_count; s++)
if (lv_is_historical(lv))
return 1;
- if (lv->status & SNAPSHOT)
+ if (lv_is_snapshot(lv))
return 0;
if (lv_is_cow(lv)) {
goto_out;
}
- if (lvl->lv->status & SNAPSHOT)
+ if (lv_is_snapshot(lvl->lv))
continue;
/* Skip availability change for non-virt snaps when processing all LVs */
lv = origin_from_cow(lv);
/* Only request activation of snapshot origin devices */
- if ((lv->status & SNAPSHOT) || lv_is_cow(lv))
+ if (lv_is_snapshot(lv) || lv_is_cow(lv))
continue;
/* Only request activation of mirror LV */
- if ((lv->status & MIRROR_IMAGE) || (lv->status & MIRROR_LOG))
+ if (lv_is_mirror_image(lv) || lv_is_mirror_log(lv))
continue;
/* Only request activation of the first replicator-dev LV */
if (cmd->fmt->features & FMT_RESTRICTED_LVIDS) {
dm_list_iterate_items(lvl, &vg->lvs) {
lv = lvl->lv;
- if (lv->status & SNAPSHOT)
+ if (lv_is_snapshot(lv))
continue;
if (lvnum_from_lvid(&lv->lvid) < MAX_RESTRICTED_LVS)
continue;
dm_list_iterate_safe(lvh, lvht, &vg_from->lvs) {
lv = dm_list_item(lvh, struct lv_list)->lv;
- if ((lv->status & SNAPSHOT))
+ if (lv_is_snapshot(lv))
continue;
if (lv_is_raid(lv))
dm_list_iterate_safe(lvh, lvht, &vg_from->lvs) {
lv = dm_list_item(lvh, struct lv_list)->lv;
- if (!(lv->status & SNAPSHOT))
+ if (!lv_is_snapshot(lv))
continue;
dm_list_iterate_items(seg, &lv->segments) {