public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
* LVM2 ./WHATS_NEW lib/metadata/merge.c lib/meta ...
@ 2005-07-12 19:41 agk
0 siblings, 0 replies; 5+ messages in thread
From: agk @ 2005-07-12 19:41 UTC (permalink / raw)
To: lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk@sourceware.org 2005-07-12 19:41:00
Modified files:
. : WHATS_NEW
lib/metadata : merge.c metadata.c metadata.h pv_manip.c
Log message:
Fix pvmove segment splitting.
Abstract vg_validate.
Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.265&r2=1.266
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/merge.c.diff?cvsroot=lvm2&r1=1.23&r2=1.24
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/metadata.c.diff?cvsroot=lvm2&r1=1.80&r2=1.81
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/metadata.h.diff?cvsroot=lvm2&r1=1.125&r2=1.126
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/pv_manip.c.diff?cvsroot=lvm2&r1=1.6&r2=1.7
^ permalink raw reply [flat|nested] 5+ messages in thread
* LVM2 ./WHATS_NEW lib/metadata/merge.c lib/meta ...
@ 2010-05-21 12:43 zkabelac
0 siblings, 0 replies; 5+ messages in thread
From: zkabelac @ 2010-05-21 12:43 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac@sourceware.org 2010-05-21 12:43:02
Modified files:
. : WHATS_NEW
lib/metadata : merge.c metadata.h replicator_manip.c
Log message:
Replicator: check replicator segment
Check for possible problems within replicator structures.
Used also by vg_validate.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1580&r2=1.1581
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/merge.c.diff?cvsroot=lvm2&r1=1.42&r2=1.43
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/metadata.h.diff?cvsroot=lvm2&r1=1.203&r2=1.204
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/replicator_manip.c.diff?cvsroot=lvm2&r1=1.1&r2=1.2
--- LVM2/WHATS_NEW 2010/05/21 12:36:30 1.1580
+++ LVM2/WHATS_NEW 2010/05/21 12:43:02 1.1581
@@ -1,5 +1,6 @@
Version 2.02.67 -
===============================
+ Add check_replicator_segment() for catching internal replicator errors.
Initial lvm2 support for Replicator metadata handling.
Checking open_count in all parents of presuspend_node.
Added dm_tree_node_set_presuspend_node() to presuspend child in deactivate.
--- LVM2/lib/metadata/merge.c 2010/05/21 12:36:31 1.42
+++ LVM2/lib/metadata/merge.c 2010/05/21 12:43:02 1.43
@@ -137,6 +137,9 @@
}
}
+ if (seg_is_replicator(seg) && !check_replicator_segment(seg))
+ inc_error_count;
+
for (s = 0; s < seg->area_count; s++) {
if (seg_type(seg, s) == AREA_UNASSIGNED) {
log_error("LV %s: segment %u has unassigned "
--- LVM2/lib/metadata/metadata.h 2010/04/13 17:25:45 1.203
+++ LVM2/lib/metadata/metadata.h 2010/05/21 12:43:02 1.204
@@ -321,6 +321,12 @@
*/
int check_lv_segments(struct logical_volume *lv, int complete_vg);
+
+/*
+ * Checks that a replicator segment is correct.
+ */
+int check_replicator_segment(const struct lv_segment *replicator_seg);
+
/*
* Sometimes (eg, after an lvextend), it is possible to merge two
* adjacent segments into a single segment. This function trys
--- LVM2/lib/metadata/replicator_manip.c 2010/05/21 12:40:05 1.1
+++ LVM2/lib/metadata/replicator_manip.c 2010/05/21 12:43:02 1.2
@@ -252,6 +252,158 @@
}
#endif
+/*
+ * Check all replicator structures:
+ * only non-clustered VG for Replicator
+ * only one segment in replicator LV
+ * site has correct combination of operation_mode parameters
+ * site and related devices have correct index numbers
+ * duplicate site names, site indexes, device names, device indexes
+ */
+int check_replicator_segment(const struct lv_segment *rseg)
+{
+ struct replicator_site *rsite, *rsiteb;
+ struct replicator_device *rdev, *rdevb;
+ struct logical_volume *lv = rseg->lv;
+ int r = 1;
+
+ if (vg_is_clustered(lv->vg)) {
+ log_error("Volume Group %s of replicator %s is clustered",
+ lv->vg->name, lv->name);
+ return 0;
+ }
+
+ if (dm_list_size(&lv->segments) != 1) {
+ log_error("Replicator %s segment size %d != 1",
+ lv->name, dm_list_size(&lv->segments));
+ return 0;
+ }
+
+ dm_list_iterate_items(rsite, &lv->rsites) {
+ if (rsite->op_mode == DM_REPLICATOR_SYNC) {
+ if (rsite->fall_behind_timeout) {
+ log_error("Defined fall_behind_timeout="
+ "%d for sync replicator %s/%s.",
+ rsite->fall_behind_timeout, lv->name,
+ rsite->name);
+ r = 0;
+ }
+ if (rsite->fall_behind_ios) {
+ log_error("Defined fall_behind_ios="
+ "%d for sync replicator %s/%s.",
+ rsite->fall_behind_ios, lv->name, rsite->name);
+ r = 0;
+ }
+ if (rsite->fall_behind_data) {
+ log_error("Defined fall_behind_data="
+ "%" PRIu64 " for sync replicator %s/%s.",
+ rsite->fall_behind_data, lv->name, rsite->name);
+ r = 0;
+ }
+ } else {
+ if (rsite->fall_behind_timeout && rsite->fall_behind_ios) {
+ log_error("Defined fall_behind_timeout and"
+ " fall_behind_ios for async replicator %s/%s.",
+ lv->name, rsite->name);
+ r = 0;
+ }
+ if (rsite->fall_behind_timeout && rsite->fall_behind_data) {
+ log_error("Defined fall_behind_timeout and"
+ " fall_behind_data for async replicator %s/%s.",
+ lv->name, rsite->name);
+ r = 0;
+ }
+ if (rsite->fall_behind_ios && rsite->fall_behind_data) {
+ log_error("Defined fall_behind_ios and"
+ " fall_behind_data for async replicator %s/%s.",
+ lv->name, rsite->name);
+ r = 0;
+ }
+ if (!rsite->fall_behind_ios &&
+ !rsite->fall_behind_data &&
+ !rsite->fall_behind_timeout) {
+ log_error("fall_behind_timeout,"
+ " fall_behind_ios and fall_behind_data are"
+ " undefined for async replicator %s/%s.",
+ lv->name, rsite->name);
+ r = 0;
+ }
+ }
+ dm_list_iterate_items(rsiteb, &lv->rsites) {
+ if (rsite == rsiteb)
+ break;
+ if (strcasecmp(rsite->name, rsiteb->name) == 0) {
+ log_error("Duplicate site name "
+ "%s detected for replicator %s.",
+ rsite->name, lv->name);
+ r = 0;
+ }
+ if ((rsite->vg_name && rsiteb->vg_name &&
+ strcasecmp(rsite->vg_name, rsiteb->vg_name) == 0) ||
+ (!rsite->vg_name && !rsiteb->vg_name)) {
+ log_error("Duplicate VG name "
+ "%s detected for replicator %s.",
+ (rsite->vg_name) ? rsite->vg_name : "<local>",
+ lv->name);
+ r = 0;
+ }
+ if (rsite->site_index == rsiteb->site_index) {
+ log_error("Duplicate site index %d detected "
+ "for replicator site %s/%s.",
+ rsite->site_index, lv->name,
+ rsite->name);
+ r = 0;
+ }
+ if (rsite->site_index > rseg->rsite_index_highest) {
+ log_error("Site index %d > %d (too high) "
+ "for replicator site %s/%s.",
+ rsite->site_index,
+ rseg->rsite_index_highest,
+ lv->name, rsite->name);
+ r = 0;
+ }
+ }
+
+ dm_list_iterate_items(rdev, &rsite->rdevices) {
+ dm_list_iterate_items(rdevb, &rsite->rdevices) {
+ if (rdev == rdevb)
+ break;
+ if (rdev->slog && (rdev->slog == rdevb->slog)) {
+ log_error("Duplicate sync log %s "
+ "detected for replicator %s.",
+ rdev->slog->name, lv->name);
+ r = 0;
+ }
+ if (strcasecmp(rdev->name, rdevb->name) == 0) {
+ log_error("Duplicate device name %s "
+ "detected for replicator %s.",
+ rdev->name, lv->name);
+ r = 0;
+ }
+ if (rdev->device_index == rdevb->device_index) {
+ log_error("Duplicate device index %"
+ PRId64 " detected for "
+ "replicator site %s/%s.",
+ rdev->device_index,
+ lv->name, rsite->name);
+ r = 0;
+ }
+ if (rdev->device_index > rseg->rdevice_index_highest) {
+ log_error("Device index %" PRIu64
+ " > %" PRIu64 " (too high) "
+ "for replicator site %s/%s.",
+ rdev->device_index,
+ rseg->rdevice_index_highest,
+ lv->name, rsite->name);
+ r = 0;
+ }
+ }
+ }
+ }
+
+ return r;
+}
+
/**
* Is this segment part of active replicator
*/
^ permalink raw reply [flat|nested] 5+ messages in thread
* LVM2 ./WHATS_NEW lib/metadata/merge.c lib/meta ...
@ 2010-03-31 12:06 mpatocka
0 siblings, 0 replies; 5+ messages in thread
From: mpatocka @ 2010-03-31 12:06 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: mpatocka@sourceware.org 2010-03-31 12:06:31
Modified files:
. : WHATS_NEW
lib/metadata : merge.c metadata.c
Log message:
A missing space in the error message.
Add missing parentheses to an error message
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1491&r2=1.1492
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/merge.c.diff?cvsroot=lvm2&r1=1.36&r2=1.37
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/metadata.c.diff?cvsroot=lvm2&r1=1.324&r2=1.325
--- LVM2/WHATS_NEW 2010/03/31 12:01:49 1.1491
+++ LVM2/WHATS_NEW 2010/03/31 12:06:30 1.1492
@@ -1,5 +1,6 @@
Version 2.02.63 -
================================
+ Fix two messages, add a whitespace and parentheses
When dmeventd is not forking because of -d flag, don't kill the parent process
Fix 'make install' when $(builddir) is different from $(srcdir).
Fix dso resource leak in error path of dmeventd.
--- LVM2/lib/metadata/merge.c 2008/11/03 22:14:29 1.36
+++ LVM2/lib/metadata/merge.c 2010/03/31 12:06:30 1.37
@@ -233,7 +233,7 @@
}
if (!seg_found) {
log_error("LV segment %s:%" PRIu32 "-%" PRIu32
- "is incorrectly listed as being used by LV %s",
+ " is incorrectly listed as being used by LV %s",
seg->lv->name, seg->le, seg->le + seg->len - 1,
lv->name);
r = 0;
--- LVM2/lib/metadata/metadata.c 2010/03/18 17:29:12 1.324
+++ LVM2/lib/metadata/metadata.c 2010/03/31 12:06:30 1.325
@@ -2207,7 +2207,7 @@
if (((uint32_t) dm_list_size(&vg->lvs)) !=
vg_visible_lvs(vg) + snapshot_count(vg) + hidden_lv_count) {
log_error(INTERNAL_ERROR "#internal LVs (%u) != #LVs (%"
- PRIu32 ") + #snapshots (%" PRIu32 ") + #internal LVs %u in VG %s",
+ PRIu32 ") + #snapshots (%" PRIu32 ") + #internal LVs (%u) in VG %s",
dm_list_size(&vg->lvs), vg_visible_lvs(vg),
snapshot_count(vg), hidden_lv_count, vg->name);
r = 0;
^ permalink raw reply [flat|nested] 5+ messages in thread
* LVM2 ./WHATS_NEW lib/metadata/merge.c lib/meta ...
@ 2007-11-07 16:33 agk
0 siblings, 0 replies; 5+ messages in thread
From: agk @ 2007-11-07 16:33 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk@sourceware.org 2007-11-07 16:33:12
Modified files:
. : WHATS_NEW
lib/metadata : merge.c snapshot_manip.c
tools : lvconvert.c
Log message:
Prevent lvconvert -s from using same LV as origin and snapshot.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.729&r2=1.730
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/merge.c.diff?cvsroot=lvm2&r1=1.29&r2=1.30
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/snapshot_manip.c.diff?cvsroot=lvm2&r1=1.28&r2=1.29
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/lvconvert.c.diff?cvsroot=lvm2&r1=1.42&r2=1.43
--- LVM2/WHATS_NEW 2007/11/05 17:17:55 1.729
+++ LVM2/WHATS_NEW 2007/11/07 16:33:11 1.730
@@ -1,5 +1,6 @@
Version 2.02.29 -
==================================
+ Prevent lvconvert -s from using same LV as origin and snapshot.
Fix human-readable output of odd numbers of sectors.
Add pv_mda_free and vg_mda_free fields to reports for raw text format.
Add LVM2 version to 'Generated by' comment in metadata.
--- LVM2/lib/metadata/merge.c 2007/08/20 20:55:26 1.29
+++ LVM2/lib/metadata/merge.c 2007/11/07 16:33:11 1.30
@@ -119,6 +119,15 @@
}
}
+ if (seg_is_snapshot(seg)) {
+ if (seg->cow && seg->cow == seg->origin) {
+ log_error("LV %s: segment %u has same LV %s for "
+ "both origin and snapshot",
+ lv->name, seg_count, seg->cow->name);
+ r = 0;
+ }
+ }
+
for (s = 0; s < seg->area_count; s++) {
if (seg_type(seg, s) == AREA_UNASSIGNED) {
log_error("LV %s: segment %u has unassigned "
--- LVM2/lib/metadata/snapshot_manip.c 2007/11/02 20:40:04 1.28
+++ LVM2/lib/metadata/snapshot_manip.c 2007/11/07 16:33:12 1.29
@@ -63,6 +63,11 @@
return 0;
}
+ if (cow == origin) {
+ log_error("Snapshot and origin LVs must differ.");
+ return 0;
+ }
+
if (!(snap = lv_create_empty(name ? name : "snapshot%d",
lvid, LVM_READ | LVM_WRITE | VISIBLE_LV,
ALLOC_INHERIT, 1, origin->vg))) {
--- LVM2/tools/lvconvert.c 2007/11/02 20:40:04 1.42
+++ LVM2/tools/lvconvert.c 2007/11/07 16:33:12 1.43
@@ -495,6 +495,12 @@
return 0;
}
+ if (org == lv) {
+ log_error("Unable to use \"%s\" as both snapshot and origin.",
+ lv->name);
+ return 0;
+ }
+
if (org->status & (LOCKED|PVMOVE) || lv_is_cow(org)) {
log_error("Unable to create a snapshot of a %s LV.",
org->status & LOCKED ? "locked" :
^ permalink raw reply [flat|nested] 5+ messages in thread
* LVM2 ./WHATS_NEW lib/metadata/merge.c lib/meta ...
@ 2004-08-17 22:09 agk
0 siblings, 0 replies; 5+ messages in thread
From: agk @ 2004-08-17 22:09 UTC (permalink / raw)
To: lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk@sourceware.org 2004-08-17 22:09:02
Modified files:
. : WHATS_NEW
lib/metadata : merge.c metadata.h mirror.c
lib/mirror : mirrored.c
tools : pvmove.c
Log message:
Support for PE ranges in pvmove source PV.
Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.65&r2=1.66
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/merge.c.diff?cvsroot=lvm2&r1=1.16&r2=1.17
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/metadata.h.diff?cvsroot=lvm2&r1=1.106&r2=1.107
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/mirror.c.diff?cvsroot=lvm2&r1=1.7&r2=1.8
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/mirror/mirrored.c.diff?cvsroot=lvm2&r1=1.3&r2=1.4
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/tools/pvmove.c.diff?cvsroot=lvm2&r1=1.17&r2=1.18
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-05-21 12:43 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-12 19:41 LVM2 ./WHATS_NEW lib/metadata/merge.c lib/meta agk
-- strict thread matches above, loose matches on Subject: below --
2010-05-21 12:43 zkabelac
2010-03-31 12:06 mpatocka
2007-11-07 16:33 agk
2004-08-17 22:09 agk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).