From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12453 invoked by alias); 16 Sep 2011 18:39:04 -0000 Received: (qmail 12436 invoked by uid 9478); 16 Sep 2011 18:39:04 -0000 Date: Fri, 16 Sep 2011 18:39:00 -0000 Message-ID: <20110916183904.12434.qmail@sourceware.org> From: jbrassow@sourceware.org To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org Subject: LVM2/lib/metadata lv_manip.c Mailing-List: contact lvm2-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: lvm2-cvs-owner@sourceware.org X-SW-Source: 2011-09/txt/msg00074.txt.bz2 CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: jbrassow@sourceware.org 2011-09-16 18:39:04 Modified files: lib/metadata : lv_manip.c Log message: Fix Bug 738832 - core to disk log conversion fails with internal error This bug showed up when trying to add a log to a mirror whose images are on multiple devices. This is an intra-release regression and no WHATS_NEW entry will be added. The error was introduce in the following commit: 2d8a2f35c77fdeef1dbe0ef791db8530d07826eb The solution is to recognise in _alloc_init that if there are no mirrors or stripes specified, then 'new_extents' should be zero. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/lv_manip.c.diff?cvsroot=lvm2&r1=1.288&r2=1.289 --- LVM2/lib/metadata/lv_manip.c 2011/09/16 12:12:51 1.288 +++ LVM2/lib/metadata/lv_manip.c 2011/09/16 18:39:03 1.289 @@ -767,7 +767,10 @@ return NULL; } - ah->new_extents = new_extents; + if (mirrors || stripes) + ah->new_extents = new_extents; + else + ah->new_extents = 0; ah->area_count = area_count; ah->parity_count = segtype->parity_devs; ah->region_size = region_size; @@ -801,7 +804,7 @@ ah->log_area_count = metadata_area_count; ah->log_len = !metadata_area_count ? 0 : mirror_log_extents(ah->region_size, extent_size, - ah->new_extents / ah->area_multiple); + new_extents / ah->area_multiple); } for (s = 0; s < alloc_count; s++)