mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-22 17:35:59 +03:00
s/MIRROR_NOTSYNCED/LV_NOTSYNCED/ - Flag will may refer to more than just mirrors
This commit is contained in:
parent
012b164bae
commit
01b265e08d
@ -55,7 +55,7 @@ static const struct flag _lv_flags[] = {
|
||||
{VISIBLE_LV, "VISIBLE", STATUS_FLAG},
|
||||
{PVMOVE, "PVMOVE", STATUS_FLAG},
|
||||
{LOCKED, "LOCKED", STATUS_FLAG},
|
||||
{MIRROR_NOTSYNCED, "NOTSYNCED", STATUS_FLAG},
|
||||
{LV_NOTSYNCED, "NOTSYNCED", STATUS_FLAG},
|
||||
{MIRROR_IMAGE, NULL, 0},
|
||||
{MIRROR_LOG, NULL, 0},
|
||||
{MIRRORED, NULL, 0},
|
||||
|
@ -236,7 +236,7 @@ char *lv_attr_dup(struct dm_pool *mem, const struct logical_volume *lv)
|
||||
repstr[0] = (lv_is_merging_origin(lv)) ? 'O' : 'o';
|
||||
}
|
||||
else if (lv->status & MIRRORED) {
|
||||
repstr[0] = (lv->status & MIRROR_NOTSYNCED) ? 'M' : 'm';
|
||||
repstr[0] = (lv->status & LV_NOTSYNCED) ? 'M' : 'm';
|
||||
}else if (lv->status & MIRROR_IMAGE)
|
||||
repstr[0] = (_lv_mimage_in_sync(lv)) ? 'i' : 'I';
|
||||
else if (lv->status & MIRROR_LOG)
|
||||
|
@ -3586,7 +3586,7 @@ int lv_create_single(struct volume_group *vg,
|
||||
if (lp->nosync) {
|
||||
log_warn("WARNING: New mirror won't be synchronised. "
|
||||
"Don't read what you didn't write!");
|
||||
status |= MIRROR_NOTSYNCED;
|
||||
status |= LV_NOTSYNCED;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -61,7 +61,7 @@
|
||||
//#define VIRTUAL 0x00010000U /* LV - internal use only */
|
||||
#define MIRROR_LOG 0x00020000U /* LV */
|
||||
#define MIRROR_IMAGE 0x00040000U /* LV */
|
||||
#define MIRROR_NOTSYNCED 0x00080000U /* LV */
|
||||
#define LV_NOTSYNCED 0x00080000U /* LV */
|
||||
//#define ACTIVATE_EXCL 0x00100000U /* LV - internal use only */
|
||||
//#define PRECOMMITTED 0x00200000U /* VG - internal use only */
|
||||
#define CONVERTING 0x00400000U /* LV */
|
||||
|
@ -701,7 +701,7 @@ static int _split_mirror_images(struct logical_volume *lv,
|
||||
if (!remove_layer_from_lv(lv, sub_lv))
|
||||
return_0;
|
||||
lv->status &= ~MIRRORED;
|
||||
lv->status &= ~MIRROR_NOTSYNCED;
|
||||
lv->status &= ~LV_NOTSYNCED;
|
||||
}
|
||||
|
||||
if (!vg_write(mirrored_seg->lv->vg)) {
|
||||
@ -882,7 +882,7 @@ static int _remove_mirror_images(struct logical_volume *lv,
|
||||
*/
|
||||
if (lv_mirror_count(lv) == 1) {
|
||||
lv->status &= ~MIRRORED;
|
||||
lv->status &= ~MIRROR_NOTSYNCED;
|
||||
lv->status &= ~LV_NOTSYNCED;
|
||||
}
|
||||
mirrored_seg = first_seg(lv);
|
||||
if (remove_log && !detached_log_lv)
|
||||
@ -894,7 +894,7 @@ static int _remove_mirror_images(struct logical_volume *lv,
|
||||
* It can happen for vgreduce --removemissing. */
|
||||
detached_log_lv = detach_mirror_log(mirrored_seg);
|
||||
lv->status &= ~MIRRORED;
|
||||
lv->status &= ~MIRROR_NOTSYNCED;
|
||||
lv->status &= ~LV_NOTSYNCED;
|
||||
if (!replace_lv_with_error_segment(lv))
|
||||
return_0;
|
||||
} else if (remove_log)
|
||||
@ -1671,7 +1671,7 @@ int remove_mirror_log(struct cmd_context *cmd,
|
||||
init_mirror_in_sync(1);
|
||||
else {
|
||||
/* A full resync will take place */
|
||||
lv->status &= ~MIRROR_NOTSYNCED;
|
||||
lv->status &= ~LV_NOTSYNCED;
|
||||
init_mirror_in_sync(0);
|
||||
}
|
||||
|
||||
|
@ -245,7 +245,7 @@ static int lvchange_resync(struct cmd_context *cmd,
|
||||
* it to reset the sync status. We only need to
|
||||
* worry about persistent logs.
|
||||
*/
|
||||
if (!log_lv && !(lv->status & MIRROR_NOTSYNCED)) {
|
||||
if (!log_lv && !(lv->status & LV_NOTSYNCED)) {
|
||||
if (active && !activate_lv(cmd, lv)) {
|
||||
log_error("Failed to reactivate %s to resynchronize "
|
||||
"mirror", lv->name);
|
||||
@ -254,7 +254,7 @@ static int lvchange_resync(struct cmd_context *cmd,
|
||||
return 1;
|
||||
}
|
||||
|
||||
lv->status &= ~MIRROR_NOTSYNCED;
|
||||
lv->status &= ~LV_NOTSYNCED;
|
||||
|
||||
if (log_lv) {
|
||||
/* Separate mirror log so we can clear it */
|
||||
|
@ -1052,7 +1052,7 @@ static int _lvconvert_mirrors_aux(struct cmd_context *cmd,
|
||||
* Up-convert m-way mirror to n-way mirror
|
||||
*/
|
||||
if (new_mimage_count > old_mimage_count) {
|
||||
if (lv->status & MIRROR_NOTSYNCED) {
|
||||
if (lv->status & LV_NOTSYNCED) {
|
||||
log_error("Can't add mirror to out-of-sync mirrored "
|
||||
"LV: use lvchange --resync first.");
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user