From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16639 invoked by alias); 21 Sep 2011 16:36:43 -0000 Received: (qmail 16611 invoked by uid 9447); 21 Sep 2011 16:36:40 -0000 Date: Wed, 21 Sep 2011 16:36:00 -0000 Message-ID: <20110921163640.16609.qmail@sourceware.org> From: agk@sourceware.org To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org Subject: LVM2/tools pvmove.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/msg00097.txt.bz2 CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: agk@sourceware.org 2011-09-21 16:36:39 Modified files: tools : pvmove.c Log message: FIXMEs to note problems with some error paths. (Perhaps safer to disable them until they can be fixed completely?) Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/pvmove.c.diff?cvsroot=lvm2&r1=1.86&r2=1.87 --- LVM2/tools/pvmove.c 2011/08/30 14:55:19 1.86 +++ LVM2/tools/pvmove.c 2011/09/21 16:36:39 1.87 @@ -365,6 +365,7 @@ } if (!_suspend_lvs(cmd, first_time, lv_mirr, lvs_changed)) { + /* FIXME vg_revert must be moved *before* any LV resumes */ vg_revert(vg); goto_out; } @@ -388,13 +389,16 @@ /* * Nothing changed yet, try to revert pvmove. + * FIXME This error path is incomplete and unsafe. */ log_error("Temporary pvmove mirror activation failed."); /* Ensure that temporary mrror is deactivate even on other nodes. */ + /* FIXME Unsafe to proceed if this fails without checking explicitly that no pvmove LVs are still active */ (void)deactivate_lv(cmd, lv_mirr); /* Revert metadata */ + /* FIXME Use --abort code instead? */ if (!_detach_pvmove_mirror(cmd, lv_mirr) || !lv_remove(lv_mirr) || !vg_write(vg) || !vg_commit(vg))