Hello community, here is the log from the commit of package lvm2 checked in at Mon Dec 18 14:01:39 CET 2006. -------- --- lvm2/lvm2.changes 2006-12-06 10:08:01.000000000 +0100 +++ /mounts/work_src_done/STABLE/lvm2/lvm2.changes 2006-12-18 14:00:11.000000000 +0100 @@ -1,0 +2,15 @@ +Mon Dec 18 10:39:49 CET 2006 - fehr@suse.de + +- update to new version 2.02.17 + Add missing pvremove error message when device doesn't exist. + When lvconvert allocates a mirror log, respect parallel area constraints. + Use loop to iterate through the now-ordered policy list in _allocate(). + Check for failure to allocate just the mirror log. + Introduce calc_area_multiple(). + Support mirror log allocation when there is only one PV: area_count now 0. + Fix detection of smallest area in _alloc_parallel_area() for cling policy. + Add manpage entry for clvmd -T + Fix gulm operation of clvmd, including a hang when doing lvchange -aey + Fix hang in clvmd if a pre-command failed. + +------------------------------------------------------------------- Old: ---- LVM2.2.02.16.tar.bz2 New: ---- LVM2.2.02.17.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ lvm2.spec ++++++ --- /var/tmp/diff_new_pack.0iNi2n/_old 2006-12-18 14:01:28.000000000 +0100 +++ /var/tmp/diff_new_pack.0iNi2n/_new 2006-12-18 14:01:28.000000000 +0100 @@ -1,5 +1,5 @@ # -# spec file for package lvm2 (Version 2.02.16) +# spec file for package lvm2 (Version 2.02.17) # # Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -20,7 +20,7 @@ PreReq: %fillup_prereq %insserv_prereq %endif Autoreqprov: on -Version: 2.02.16 +Version: 2.02.17 Release: 1 Summary: LVM2 Tools Source: LVM2.%{version}.tar.bz2 @@ -176,6 +176,18 @@ %{_mandir}/man8/vgsplit.8.gz %changelog -n lvm2 +* Mon Dec 18 2006 - fehr@suse.de +- update to new version 2.02.17 + Add missing pvremove error message when device doesn't exist. + When lvconvert allocates a mirror log, respect parallel area constraints. + Use loop to iterate through the now-ordered policy list in _allocate(). + Check for failure to allocate just the mirror log. + Introduce calc_area_multiple(). + Support mirror log allocation when there is only one PV: area_count now 0. + Fix detection of smallest area in _alloc_parallel_area() for cling policy. + Add manpage entry for clvmd -T + Fix gulm operation of clvmd, including a hang when doing lvchange -aey + Fix hang in clvmd if a pre-command failed. * Wed Dec 06 2006 - fehr@suse.de - update to new version 2.02.16 Fix VG clustered read locks to use PR not CR. ++++++ LVM2.2.02.16.tar.bz2 -> LVM2.2.02.17.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/LVM2.2.02.16/VERSION new/LVM2.2.02.17/VERSION --- old/LVM2.2.02.16/VERSION 2006-12-02 00:22:12.000000000 +0100 +++ new/LVM2.2.02.17/VERSION 2006-12-14 21:06:12.000000000 +0100 @@ -1 +1 @@ -2.02.16 (2006-12-01) +2.02.17 (2006-12-14) diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/LVM2.2.02.16/WHATS_NEW new/LVM2.2.02.17/WHATS_NEW --- old/LVM2.2.02.16/WHATS_NEW 2006-12-02 00:15:59.000000000 +0100 +++ new/LVM2.2.02.17/WHATS_NEW 2006-12-14 21:05:08.000000000 +0100 @@ -1,3 +1,16 @@ +Version 2.02.17 - 14th December 2006 +==================================== + Add missing pvremove error message when device doesn't exist. + When lvconvert allocates a mirror log, respect parallel area constraints. + Use loop to iterate through the now-ordered policy list in _allocate(). + Check for failure to allocate just the mirror log. + Introduce calc_area_multiple(). + Support mirror log allocation when there is only one PV: area_count now 0. + Fix detection of smallest area in _alloc_parallel_area() for cling policy. + Add manpage entry for clvmd -T + Fix gulm operation of clvmd, including a hang when doing lvchange -aey + Fix hang in clvmd if a pre-command failed. + Version 2.02.16 - 1st December 2006 =================================== Fix VG clustered read locks to use PR not CR. diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/LVM2.2.02.16/daemons/clvmd/clvmd-command.c new/LVM2.2.02.17/daemons/clvmd/clvmd-command.c --- old/LVM2.2.02.16/daemons/clvmd/clvmd-command.c 2006-12-02 00:10:25.000000000 +0100 +++ new/LVM2.2.02.17/daemons/clvmd/clvmd-command.c 2006-12-11 15:00:26.000000000 +0100 @@ -194,7 +194,7 @@ /* Read locks need to be PR; other modes get passed through */ if ((lock_cmd & LCK_TYPE_MASK) == LCK_READ) { lock_cmd &= ~LCK_TYPE_MASK; - lock_cmd |= LKM_PRMODE; + lock_cmd |= LCK_PREAD; } status = sync_lock(lockname, (int)lock_cmd, (lock_flags & LCK_NONBLOCK) ? LKF_NOQUEUE : 0, &lkid); if (status) diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/LVM2.2.02.16/daemons/clvmd/clvmd-gulm.c new/LVM2.2.02.17/daemons/clvmd/clvmd-gulm.c --- old/LVM2.2.02.16/daemons/clvmd/clvmd-gulm.c 2006-10-09 16:11:57.000000000 +0200 +++ new/LVM2.2.02.17/daemons/clvmd/clvmd-gulm.c 2006-12-11 15:00:26.000000000 +0100 @@ -730,7 +730,7 @@ pthread_mutex_lock(&lwait.mutex); /* This needs to be converted from DLM/LVM2 value for GULM */ - if (flags == LCK_NONBLOCK) flags = lg_lock_flag_Try; + if (flags & LKF_NOQUEUE) flags = lg_lock_flag_Try; dm_hash_insert(lock_hash, resource, &lwait); DEBUGLOG("lock_resource '%s', flags=%d, mode=%d\n", resource, flags, mode); @@ -828,6 +828,7 @@ } break; + case LCK_PREAD: case LCK_READ: status = _lock_resource(lock1, lg_lock_state_Shared, flags, lockid); if (status) @@ -864,6 +865,7 @@ /* The held lock mode is in the lock id */ assert(lockid == LCK_EXCL || lockid == LCK_READ || + lockid == LCK_PREAD || lockid == LCK_WRITE); status = _unlock_resource(lock1, lockid); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/LVM2.2.02.16/daemons/clvmd/clvmd-gulm.h new/LVM2.2.02.17/daemons/clvmd/clvmd-gulm.h --- old/LVM2.2.02.16/daemons/clvmd/clvmd-gulm.h 2005-01-13 14:24:02.000000000 +0100 +++ new/LVM2.2.02.17/daemons/clvmd/clvmd-gulm.h 2006-12-11 15:00:26.000000000 +0100 @@ -1,5 +1,6 @@ - +/* DLM constant that clvmd uses as a generic NONBLOCK lock flag */ +#define LKF_NOQUEUE 1 extern int get_next_node_csid(void **context, char *csid); extern void add_down_node(char *csid); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/LVM2.2.02.16/daemons/clvmd/clvmd.c new/LVM2.2.02.17/daemons/clvmd/clvmd.c --- old/LVM2.2.02.16/daemons/clvmd/clvmd.c 2006-12-02 00:10:25.000000000 +0100 +++ new/LVM2.2.02.17/daemons/clvmd/clvmd.c 2006-12-11 14:48:41.000000000 +0100 @@ -1426,6 +1426,8 @@ DEBUGLOG("Writing status %d down pipe %d\n", status, pipe_fd); /* Tell the parent process we have finished this bit */ write(pipe_fd, &status, sizeof(int)); + if (status) + continue; /* Wait for another PRE command */ /* We may need to wait for the condition variable before running the post command */ pthread_mutex_lock(&client->bits.localsock.mutex); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/LVM2.2.02.16/lib/locking/locking.h new/LVM2.2.02.17/lib/locking/locking.h --- old/LVM2.2.02.16/lib/locking/locking.h 2006-05-16 18:48:30.000000000 +0200 +++ new/LVM2.2.02.17/lib/locking/locking.h 2006-12-11 15:00:26.000000000 +0100 @@ -50,7 +50,7 @@ #define LCK_NULL 0x00000000 /* LCK$_NLMODE */ #define LCK_READ 0x00000001 /* LCK$_CRMODE */ /* LCK$_CWMODE */ - /* LCK$_PRMODE */ +#define LCK_PREAD 0x00000003 /* LCK$_PRMODE */ #define LCK_WRITE 0x00000004 /* LCK$_PWMODE */ #define LCK_EXCL 0x00000005 /* LCK$_EXMODE */ #define LCK_UNLOCK 0x00000006 /* This is ours */ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/LVM2.2.02.16/lib/metadata/lv_manip.c new/LVM2.2.02.17/lib/metadata/lv_manip.c --- old/LVM2.2.02.16/lib/metadata/lv_manip.c 2006-10-30 17:10:55.000000000 +0100 +++ new/LVM2.2.02.17/lib/metadata/lv_manip.c 2006-12-13 04:39:58.000000000 +0100 @@ -415,6 +415,15 @@ struct list alloced_areas[0]; /* Lists of areas in each stripe */ }; +static uint32_t calc_area_multiple(const struct segment_type *segtype, + const uint32_t area_count) +{ + if (!segtype_is_striped(segtype) || !area_count) + return 1; + + return area_count; +} + /* * Preparation for a specific allocation attempt */ @@ -476,7 +485,7 @@ ah->area_count = area_count; ah->log_count = log_count; ah->alloc = alloc; - ah->area_multiple = segtype_is_striped(segtype) ? ah->area_count : 1; + ah->area_multiple = calc_area_multiple(segtype, area_count); for (s = 0; s < ah->area_count; s++) list_init(&ah->alloced_areas[s]); @@ -553,7 +562,7 @@ if (mirrored_pv) extra_areas = 1; - area_multiple = segtype_is_striped(segtype) ? area_count : 1; + area_multiple = calc_area_multiple(segtype, area_count); /* log_lv gets set up elsehere */ if (!(seg = alloc_lv_segment(lv->vg->cmd->mem, segtype, lv, @@ -628,17 +637,17 @@ struct pv_area **areas, uint32_t *ix, struct pv_area *log_area) { - uint32_t area_len, smallest, remaining; + uint32_t area_len, remaining; uint32_t s; struct alloced_area *aa; remaining = needed - *ix; area_len = remaining / ah->area_multiple; - smallest = areas[ah->area_count - 1]->count; - - if (area_len > smallest) - area_len = smallest; + /* Reduce area_len to the smallest of the areas */ + for (s = 0; s < ah->area_count; s++) + if (area_len > areas[s]->count) + area_len = areas[s]->count; if (!(aa = dm_pool_alloc(ah->mem, sizeof(*aa) * (ah->area_count + (log_area ? 1 : 0))))) { @@ -707,7 +716,7 @@ if (max_seg_len && *max_seg_len > remaining_seg_len) *max_seg_len = remaining_seg_len; - area_multiple = segtype_is_striped(seg->segtype) ? seg->area_count : 1; + area_multiple = calc_area_multiple(seg->segtype, seg->area_count); area_len = remaining_seg_len / area_multiple ? : 1; for (s = first_area; @@ -1066,6 +1075,7 @@ int r = 0; struct list *pvms; uint32_t areas_size; + alloc_policy_t alloc; if (allocated >= new_extents && !ah->log_count) { log_error("_allocate called with no work to do!"); @@ -1111,50 +1121,18 @@ return 0; } - old_allocated = allocated; - if (!_find_parallel_space(ah, ALLOC_CONTIGUOUS, pvms, areas, - areas_size, can_split, - prev_lvseg, &allocated, new_extents)) { - stack; - goto out; - } - - if ((allocated == new_extents) || (ah->alloc == ALLOC_CONTIGUOUS) || - (!can_split && (allocated != old_allocated))) - goto finished; - - old_allocated = allocated; - if (!_find_parallel_space(ah, ALLOC_CLING, pvms, areas, - areas_size, can_split, - prev_lvseg, &allocated, new_extents)) { - stack; - goto out; - } - - if ((allocated == new_extents) || (ah->alloc == ALLOC_CLING) || - (!can_split && (allocated != old_allocated))) - goto finished; - - old_allocated = allocated; - if (!_find_parallel_space(ah, ALLOC_NORMAL, pvms, areas, - areas_size, can_split, - prev_lvseg, &allocated, new_extents)) { - stack; - goto out; - } - - if ((allocated == new_extents) || (ah->alloc == ALLOC_NORMAL) || - (!can_split && (allocated != old_allocated))) - goto finished; - - if (!_find_parallel_space(ah, ALLOC_ANYWHERE, pvms, areas, - areas_size, can_split, - prev_lvseg, &allocated, new_extents)) { - stack; - goto out; + /* Attempt each defined allocation policy in turn */ + for (alloc = ALLOC_CONTIGUOUS; alloc < ALLOC_INHERIT; alloc++) { + old_allocated = allocated; + if (!_find_parallel_space(ah, alloc, pvms, areas, + areas_size, can_split, + prev_lvseg, &allocated, new_extents)) + goto_out; + if ((allocated == new_extents) || (ah->alloc == alloc) || + (!can_split && (allocated != old_allocated))) + break; } - finished: if (allocated != new_extents) { log_error("Insufficient suitable %sallocatable extents " "for logical volume %s: %u more required", @@ -1165,6 +1143,13 @@ goto out; } + if (ah->log_count && !ah->log_area.len) { + log_error("Insufficient extents for log allocation " + "for logical volume %s.", + lv ? lv->name : ""); + goto out; + } + r = 1; out: diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/LVM2.2.02.16/lib/metadata/metadata.h new/LVM2.2.02.17/lib/metadata/metadata.h --- old/LVM2.2.02.16/lib/metadata/metadata.h 2006-11-03 22:07:14.000000000 +0100 +++ new/LVM2.2.02.17/lib/metadata/metadata.h 2006-12-13 04:39:58.000000000 +0100 @@ -78,17 +78,18 @@ #define FMT_RESIZE_PV 0x00000080U /* Supports pvresize? */ #define FMT_UNLIMITED_STRIPESIZE 0x00000100U /* Unlimited stripe size? */ +/* Ordered list - see lv_manip.c */ typedef enum { - ALLOC_INVALID = 0, - ALLOC_INHERIT, + ALLOC_INVALID, ALLOC_CONTIGUOUS, ALLOC_CLING, ALLOC_NORMAL, - ALLOC_ANYWHERE + ALLOC_ANYWHERE, + ALLOC_INHERIT } alloc_policy_t; typedef enum { - AREA_UNASSIGNED = 0, + AREA_UNASSIGNED, AREA_PV, AREA_LV } area_type_t; diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/LVM2.2.02.16/man/clvmd.8 new/LVM2.2.02.17/man/clvmd.8 --- old/LVM2.2.02.16/man/clvmd.8 2006-10-04 10:28:17.000000000 +0200 +++ new/LVM2.2.02.17/man/clvmd.8 2006-12-11 15:06:25.000000000 +0100 @@ -6,6 +6,7 @@ [\-d] [\-h] [\-R] [\-t <timeout>] +[\-T <start timeout>] [\-V] .SH DESCRIPTION clvmd is the daemon that distributes LVM metadata updates around a cluster. @@ -23,6 +24,23 @@ may need to increase this on systems with very large disk farms. The default is 30 seconds. .TP +.I \-T <start timeout> +Specifies the timeout for clvmd daemon startup. If the daemon does not report +that it has started up within this time then the parent command will exit with +status of 5. This does NOT mean that clvmd has not started! What it means is +that the startup of clvmd has been delayed for some reason; the most likely +cause of this is an inquorate cluster though it could be due to locking +latencies on a cluster with large numbers of logical volumes. If you get the +return code of 5 it is usually not necessary to restart clvmd - it will start +as soon as that blockage has cleared. This flag is to allow startup scripts +to exit in a timely fashion even if the cluster is stalled for some reason. +<br> +The default is 0 (no timeout) and the value is in seconds. Don't set this too +small or you will experience spurious errors. 10 or 20 seconds might be +sensible. +<br> +This timeout will be ignored if you start clvmd with the -d switch. +.TP .I \-R Tells all the running clvmd in the cluster to reload their device cache and re-read the lvm configuration file. This command should be run whenever the diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/LVM2.2.02.16/tools/lvconvert.c new/LVM2.2.02.17/tools/lvconvert.c --- old/LVM2.2.02.16/tools/lvconvert.c 2006-11-03 00:33:20.000000000 +0100 +++ new/LVM2.2.02.17/tools/lvconvert.c 2006-12-13 04:39:58.000000000 +0100 @@ -281,15 +281,8 @@ if (lp->mirrors == existing_mirrors) { if (!seg->log_lv && !arg_count(cmd, corelog_ARG)) { /* No disk log present, add one. */ - /* FIXME: Why doesn't this work? Without - it, we will probably put the log on the - same device as a mirror leg. - if (!(parallel_areas = build_parallel_areas_from_lv(cmd, lv))) { - stack; - return 0; - } - */ - parallel_areas = NULL; + if (!(parallel_areas = build_parallel_areas_from_lv(cmd, lv))) + return_0; if (!lv_mirror_percent(cmd, lv, 0, &sync_percent, NULL)) { log_error("Unable to determine mirror sync status."); return 0; @@ -297,7 +290,7 @@ segtype = get_segtype_from_string(cmd, "striped"); - if (!(ah = allocate_extents(lv->vg, NULL, segtype, 1, + if (!(ah = allocate_extents(lv->vg, NULL, segtype, 0, 0, 1, 0, NULL, 0, 0, lp->pvh, lp->alloc, diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/LVM2.2.02.16/tools/pvremove.c new/LVM2.2.02.17/tools/pvremove.c --- old/LVM2.2.02.16/tools/pvremove.c 2006-11-17 03:45:51.000000000 +0100 +++ new/LVM2.2.02.17/tools/pvremove.c 2006-12-13 19:40:23.000000000 +0100 @@ -38,8 +38,8 @@ if (!(pv = pv_read(cmd, name, NULL, NULL, 1))) { if (arg_count(cmd, force_ARG)) return 1; - else - return 0; + log_error("Physical Volume %s not found", name); + return 0; } /* orphan ? */ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org