public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
* LVM2 ./WHATS_NEW lib/mirror/mirrored.c
@ 2009-11-18 16:48 mbroz
0 siblings, 0 replies; 11+ messages in thread
From: mbroz @ 2009-11-18 16:48 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: mbroz@sourceware.org 2009-11-18 16:48:10
Modified files:
. : WHATS_NEW
lib/mirror : mirrored.c
Log message:
Fix pvmove region_size overflow for very large PVs.
Fixes problem reported in
https://www.redhat.com/archives/dm-devel/2009-November/msg00104.html
The region size multiplication can overflow when using 32bit integer.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1314&r2=1.1315
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/mirror/mirrored.c.diff?cvsroot=lvm2&r1=1.64&r2=1.65
--- LVM2/WHATS_NEW 2009/11/04 14:47:27 1.1314
+++ LVM2/WHATS_NEW 2009/11/18 16:48:10 1.1315
@@ -1,5 +1,6 @@
Version 2.02.55 -
===================================
+ Fix pvmove region_size oveflow for very large PVs.
Fix lvcreate and lvresize processing of %PVS argument.
Tidy some uses of arg_count and introduce arg_is_set.
Export outnl and indent functions for modules.
--- LVM2/lib/mirror/mirrored.c 2009/10/01 00:35:30 1.64
+++ LVM2/lib/mirror/mirrored.c 2009/11/18 16:48:10 1.65
@@ -290,7 +290,7 @@
uint32_t area_count = seg->area_count;
unsigned start_area = 0u;
int mirror_status = MIRR_RUNNING;
- uint32_t region_size, region_max;
+ uint32_t region_size;
int r;
if (!*target_state)
@@ -333,18 +333,11 @@
return 0;
}
region_size = seg->region_size;
- } else {
- /* Find largest power of 2 region size unit we can use */
- region_max = (1 << (ffs((int)seg->area_len) - 1)) *
- seg->lv->vg->extent_size;
-
- region_size = mirr_state->default_region_size;
- if (region_max < region_size) {
- region_size = region_max;
- log_verbose("Using reduced mirror region size of %u sectors",
- region_size);
- }
- }
+
+ } else
+ region_size = adjusted_mirror_region_size(seg->lv->vg->extent_size,
+ seg->area_len,
+ mirr_state->default_region_size);
if (!dm_tree_node_add_mirror_target(node, len))
return_0;
^ permalink raw reply [flat|nested] 11+ messages in thread
* LVM2 ./WHATS_NEW lib/mirror/mirrored.c
@ 2012-02-23 22:30 zkabelac
0 siblings, 0 replies; 11+ messages in thread
From: zkabelac @ 2012-02-23 22:30 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac@sourceware.org 2012-02-23 22:30:20
Modified files:
. : WHATS_NEW
lib/mirror : mirrored.c
Log message:
Use same signed numbers
Keep unsigned aritmetic.
TODO: we should probably switch dm_split_words() to return unsigned numbers.
(minor API libdm change mostly compatible)
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.2306&r2=1.2307
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/mirror/mirrored.c.diff?cvsroot=lvm2&r1=1.95&r2=1.96
--- LVM2/WHATS_NEW 2012/02/23 18:26:28 1.2306
+++ LVM2/WHATS_NEW 2012/02/23 22:30:20 1.2307
@@ -1,5 +1,6 @@
Version 2.02.94 -
====================================
+ Use same signed numbers in _mirrored_transient_status().
Integrate client-side lvmetad into build.
Version 2.02.93 - 23rd February 2012
--- LVM2/lib/mirror/mirrored.c 2012/02/23 22:24:47 1.95
+++ LVM2/lib/mirror/mirrored.c 2012/02/23 22:30:20 1.96
@@ -226,14 +226,14 @@
static int _mirrored_transient_status(struct lv_segment *seg, char *params)
{
- int i, j;
+ unsigned i, j;
struct logical_volume *lv = seg->lv;
struct lvinfo info;
char *p = NULL;
char **args, **log_args;
struct logical_volume **images;
struct logical_volume *log;
- int num_devs, log_argc;
+ unsigned num_devs, log_argc;
int failed = 0;
char *status;
@@ -243,12 +243,12 @@
if (!dm_split_words(params, 1, 0, &p))
return_0;
- if (!(num_devs = atoi(p)))
+ if (!(num_devs = (unsigned) atoi(p)))
return_0;
p += strlen(p) + 1;
- if (num_devs > DEFAULT_MIRROR_MAX_IMAGES || num_devs < 0) {
+ if (num_devs > DEFAULT_MIRROR_MAX_IMAGES) {
log_error("Unexpectedly many (%d) mirror images in %s.",
num_devs, lv->name);
return 0;
@@ -257,12 +257,13 @@
args = alloca((num_devs + 5) * sizeof(char *));
images = alloca(num_devs * sizeof(struct logical_volume *));
- if (dm_split_words(p, num_devs + 4, 0, args) < num_devs + 4)
+ /* FIXME: dm_split_words() should return unsigned */
+ if ((unsigned)dm_split_words(p, num_devs + 4, 0, args) < num_devs + 4)
return_0;
- log_argc = atoi(args[3 + num_devs]);
+ log_argc = (unsigned) atoi(args[3 + num_devs]);
- if (log_argc > 16 || log_argc < 0) {
+ if (log_argc > 16) {
log_error("Unexpectedly many (%d) log arguments in %s.",
log_argc, lv->name);
return 0;
@@ -270,8 +271,8 @@
log_args = alloca(log_argc * sizeof(char *));
- if (dm_split_words(args[3 + num_devs] + strlen(args[3 + num_devs]) + 1,
- log_argc, 0, log_args) < log_argc)
+ if ((unsigned)dm_split_words(args[3 + num_devs] + strlen(args[3 + num_devs]) + 1,
+ log_argc, 0, log_args) < log_argc)
return_0;
if (num_devs != seg->area_count) {
^ permalink raw reply [flat|nested] 11+ messages in thread
* LVM2 ./WHATS_NEW lib/mirror/mirrored.c
@ 2012-02-13 11:07 zkabelac
0 siblings, 0 replies; 11+ messages in thread
From: zkabelac @ 2012-02-13 11:07 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac@sourceware.org 2012-02-13 11:07:55
Modified files:
. : WHATS_NEW
lib/mirror : mirrored.c
Log message:
Add check for failure
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.2286&r2=1.2287
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/mirror/mirrored.c.diff?cvsroot=lvm2&r1=1.93&r2=1.94
--- LVM2/WHATS_NEW 2012/02/13 11:03:59 1.2286
+++ LVM2/WHATS_NEW 2012/02/13 11:07:55 1.2287
@@ -1,5 +1,6 @@
Version 2.02.92 -
====================================
+ Add check for _mirrored_init_target failure.
Add free_orphan_vg.
Skip pv/vg_set_fid processing if the fid is same.
Check for foreach loop errors in _vg_read_orphans() (2.02.91).
--- LVM2/lib/mirror/mirrored.c 2012/02/08 11:29:14 1.93
+++ LVM2/lib/mirror/mirrored.c 2012/02/13 11:07:55 1.94
@@ -398,8 +398,9 @@
uint32_t region_size;
int r;
- if (!*target_state)
- *target_state = _mirrored_init_target(mem, cmd);
+ if (!*target_state &&
+ !(*target_state = _mirrored_init_target(mem, cmd)))
+ return_0;
mirr_state = *target_state;
^ permalink raw reply [flat|nested] 11+ messages in thread
* LVM2 ./WHATS_NEW lib/mirror/mirrored.c
@ 2011-06-17 14:17 zkabelac
0 siblings, 0 replies; 11+ messages in thread
From: zkabelac @ 2011-06-17 14:17 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac@sourceware.org 2011-06-17 14:17:17
Modified files:
. : WHATS_NEW
lib/mirror : mirrored.c
Log message:
Use lv_activate_opts struct instead of ACTIVATE_EXCL status flag.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.2017&r2=1.2018
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/mirror/mirrored.c.diff?cvsroot=lvm2&r1=1.88&r2=1.89
--- LVM2/WHATS_NEW 2011/06/17 14:14:19 1.2017
+++ LVM2/WHATS_NEW 2011/06/17 14:17:16 1.2018
@@ -1,5 +1,6 @@
Version 2.02.86 -
=================================
+ Use lv_activate_opts struct instead of ACTIVATE_EXCL status flag.
Add lv_activate_opts structure for activation (replacing activation flags).
Fix a problem with inconsistent pre-commit metadata on MISSING_PV devices.
Add proper udev library context initialization and finalization to liblvm.
--- LVM2/lib/mirror/mirrored.c 2011/06/17 14:14:20 1.88
+++ LVM2/lib/mirror/mirrored.c 2011/06/17 14:17:17 1.89
@@ -360,8 +360,7 @@
* Use clustered mirror log for non-exclusive activation
* in clustered VG.
*/
- if ((!(seg->lv->status & ACTIVATE_EXCL) &&
- (vg_is_clustered(seg->lv->vg))))
+ if (!laopts->exclusive && vg_is_clustered(seg->lv->vg))
clustered = 1;
if (seg->log_lv) {
^ permalink raw reply [flat|nested] 11+ messages in thread
* LVM2 ./WHATS_NEW lib/mirror/mirrored.c
@ 2010-12-01 13:01 zkabelac
0 siblings, 0 replies; 11+ messages in thread
From: zkabelac @ 2010-12-01 13:01 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac@sourceware.org 2010-12-01 13:01:36
Modified files:
. : WHATS_NEW
lib/mirror : mirrored.c
Log message:
Check lv_info() success
Add log_error message for lv_info failure and exit from futher
processing.
Replace 'leg' occurence in debug message with 'image' which
is used in other messages.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1824&r2=1.1825
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/mirror/mirrored.c.diff?cvsroot=lvm2&r1=1.79&r2=1.80
--- LVM2/WHATS_NEW 2010/12/01 12:56:39 1.1824
+++ LVM2/WHATS_NEW 2010/12/01 13:01:36 1.1825
@@ -1,5 +1,6 @@
Version 2.02.78 -
====================================
+ Check lv_info() success in _mirrored_transient_status().
Add backtraces for dev_set() and dev_close_immediate() errors in set_lv().
Add logging for unlink() error in clvmd remove_lockfile().
Add logging for pipe write() and close() error in clvmd child_init_signal().
--- LVM2/lib/mirror/mirrored.c 2010/11/30 11:53:32 1.79
+++ LVM2/lib/mirror/mirrored.c 2010/12/01 13:01:36 1.80
@@ -291,7 +291,11 @@
if (!strcmp(log_args[0], "disk")) {
char buf[32];
log = first_seg(lv)->log_lv;
- lv_info(lv->vg->cmd, log, 0, &info, 0, 0);
+ if (!lv_info(lv->vg->cmd, log, 0, &info, 0, 0)) {
+ log_error("Check for existence of mirror log %s failed.",
+ log->name);
+ return 0;
+ }
log_debug("Found mirror log at %d:%d", info.major, info.minor);
sprintf(buf, "%d:%d", info.major, info.minor);
if (strcmp(buf, log_args[1])) {
@@ -311,8 +315,12 @@
for (i = 0; i < seg->area_count; ++i) {
char buf[32];
- lv_info(lv->vg->cmd, seg_lv(seg, i), 0, &info, 0, 0);
- log_debug("Found mirror leg at %d:%d", info.major, info.minor);
+ if (!lv_info(lv->vg->cmd, seg_lv(seg, i), 0, &info, 0, 0)) {
+ log_error("Check for existence of mirror image %s failed.",
+ seg_lv(seg, i)->name);
+ return 0;
+ }
+ log_debug("Found mirror image at %d:%d", info.major, info.minor);
sprintf(buf, "%d:%d", info.major, info.minor);
for (j = 0; j < num_devs; ++j) {
if (!strcmp(buf, args[j])) {
^ permalink raw reply [flat|nested] 11+ messages in thread
* LVM2 ./WHATS_NEW lib/mirror/mirrored.c
@ 2010-05-24 16:30 agk
0 siblings, 0 replies; 11+ messages in thread
From: agk @ 2010-05-24 16:30 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk@sourceware.org 2010-05-24 16:30:16
Modified files:
. : WHATS_NEW
lib/mirror : mirrored.c
Log message:
Update clustered log kernel module name to log-userspace.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1594&r2=1.1595
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/mirror/mirrored.c.diff?cvsroot=lvm2&r1=1.68&r2=1.69
--- LVM2/WHATS_NEW 2010/05/24 09:03:39 1.1594
+++ LVM2/WHATS_NEW 2010/05/24 16:30:15 1.1595
@@ -1,5 +1,6 @@
Version 2.02.67 -
===============================
+ Update clustered log kernel module name to log-userspace.
Activate only first head of Replicator for vgchange -ay.
Add Replicators' LVs to dtree for activation.
Avoid print activation message if there is a missing VG (Replicator).
--- LVM2/lib/mirror/mirrored.c 2010/05/24 15:32:21 1.68
+++ LVM2/lib/mirror/mirrored.c 2010/05/24 16:30:16 1.69
@@ -503,7 +503,7 @@
* FIXME: Fails incorrectly if cmirror was built into kernel.
*/
if (attributes) {
- if (!_mirror_attributes && module_present(cmd, "log-clustered"))
+ if (!_mirror_attributes && module_present(cmd, "log-userspace"))
_mirror_attributes |= MIRROR_LOG_CLUSTERED;
*attributes = _mirror_attributes;
}
^ permalink raw reply [flat|nested] 11+ messages in thread
* LVM2 ./WHATS_NEW lib/mirror/mirrored.c
@ 2008-07-31 14:43 agk
0 siblings, 0 replies; 11+ messages in thread
From: agk @ 2008-07-31 14:43 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk@sourceware.org 2008-07-31 14:43:39
Modified files:
. : WHATS_NEW
lib/mirror : mirrored.c
Log message:
Change clustered mirror kernel module name from cmirror to dm-log-clustered.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.941&r2=1.942
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/mirror/mirrored.c.diff?cvsroot=lvm2&r1=1.56&r2=1.57
--- LVM2/WHATS_NEW 2008/07/31 13:07:01 1.941
+++ LVM2/WHATS_NEW 2008/07/31 14:43:39 1.942
@@ -1,5 +1,6 @@
Version 2.02.40 -
================================
+ Change clustered mirror kernel module name from cmirror to dm-log-clustered.
Avoid looping forever in _pv_analyze_mda_raw used by pvck.
Change lvchange exit status to indicate if any part of the operation failed.
Fix pvchange and pvremove to handle PVs without mdas.
--- LVM2/lib/mirror/mirrored.c 2008/07/15 00:25:51 1.56
+++ LVM2/lib/mirror/mirrored.c 2008/07/31 14:43:39 1.57
@@ -375,7 +375,7 @@
* FIXME: Fails incorrectly if cmirror was built into kernel.
*/
if (attributes) {
- if (!_mirror_attributes && module_present("cmirror"))
+ if (!_mirror_attributes && module_present("log-clustered"))
_mirror_attributes |= MIRROR_LOG_CLUSTERED;
*attributes = _mirror_attributes;
}
^ permalink raw reply [flat|nested] 11+ messages in thread
* LVM2 ./WHATS_NEW lib/mirror/mirrored.c
@ 2008-01-16 15:24 agk
0 siblings, 0 replies; 11+ messages in thread
From: agk @ 2008-01-16 15:24 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk@sourceware.org 2008-01-16 15:24:25
Modified files:
. : WHATS_NEW
lib/mirror : mirrored.c
Log message:
Don't use block_on_error with mirror targets above version 1.12.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.760&r2=1.761
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/mirror/mirrored.c.diff?cvsroot=lvm2&r1=1.46&r2=1.47
--- LVM2/WHATS_NEW 2008/01/15 20:37:49 1.760
+++ LVM2/WHATS_NEW 2008/01/16 15:24:25 1.761
@@ -1,5 +1,6 @@
Version 2.02.30 -
===================================
+ Don't use block_on_error with mirror targets above version 1.12.
Update vgsplit to include vgcreate-style options when new VG is destination.
Update vgsplit to accept existing VG as destination.
lvconvert waits for completion of initial sync by default.
--- LVM2/lib/mirror/mirrored.c 2007/08/20 20:55:27 1.46
+++ LVM2/lib/mirror/mirrored.c 2008/01/16 15:24:25 1.47
@@ -348,14 +348,14 @@
_mirrored_present = target_present("mirror", 1);
/*
- * block_on_error available with mirror target >= 1.1
+ * block_on_error available with mirror target >= 1.1 and <= 1.11
* or with 1.0 in RHEL4U3 driver >= 4.5
*/
/* FIXME Move this into libdevmapper */
if (target_version("mirror", &maj, &min, &patchlevel) &&
maj == 1 &&
- (min >= 1 ||
+ ((min >= 1 && min <= 11) ||
(min == 0 && driver_version(vsn, sizeof(vsn)) &&
sscanf(vsn, "%u.%u.%u", &maj2, &min2, &patchlevel2) == 3 &&
maj2 == 4 && min2 == 5 && patchlevel2 == 0))) /* RHEL4U3 */
^ permalink raw reply [flat|nested] 11+ messages in thread
* LVM2 ./WHATS_NEW lib/mirror/mirrored.c
@ 2006-05-11 19:47 agk
0 siblings, 0 replies; 11+ messages in thread
From: agk @ 2006-05-11 19:47 UTC (permalink / raw)
To: lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk@sourceware.org 2006-05-11 19:47:53
Modified files:
. : WHATS_NEW
lib/mirror : mirrored.c
Log message:
Use mirror's uuid for a core log.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.384&r2=1.385
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/mirror/mirrored.c.diff?cvsroot=lvm2&r1=1.32&r2=1.33
^ permalink raw reply [flat|nested] 11+ messages in thread
* LVM2 ./WHATS_NEW lib/mirror/mirrored.c
@ 2005-10-26 16:12 agk
0 siblings, 0 replies; 11+ messages in thread
From: agk @ 2005-10-26 16:12 UTC (permalink / raw)
To: lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk@sourceware.org 2005-10-26 16:12:36
Modified files:
. : WHATS_NEW
lib/mirror : mirrored.c
Log message:
Fix lvdisplay to show all mirror destinations.
Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.313&r2=1.314
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/mirror/mirrored.c.diff?cvsroot=lvm2&r1=1.14&r2=1.15
^ permalink raw reply [flat|nested] 11+ messages in thread
* LVM2 ./WHATS_NEW lib/mirror/mirrored.c
@ 2005-09-02 16:59 agk
0 siblings, 0 replies; 11+ messages in thread
From: agk @ 2005-09-02 16:59 UTC (permalink / raw)
To: lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk@sourceware.org 2005-09-02 16:59:46
Modified files:
. : WHATS_NEW
lib/mirror : mirrored.c
Log message:
Don't assume exactly two mirrors when parsing mirror status
Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.290&r2=1.291
http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/lib/mirror/mirrored.c.diff?cvsroot=lvm2&r1=1.11&r2=1.12
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2012-02-23 22:30 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-18 16:48 LVM2 ./WHATS_NEW lib/mirror/mirrored.c mbroz
-- strict thread matches above, loose matches on Subject: below --
2012-02-23 22:30 zkabelac
2012-02-13 11:07 zkabelac
2011-06-17 14:17 zkabelac
2010-12-01 13:01 zkabelac
2010-05-24 16:30 agk
2008-07-31 14:43 agk
2008-01-16 15:24 agk
2006-05-11 19:47 agk
2005-10-26 16:12 agk
2005-09-02 16:59 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).