From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32468 invoked by alias); 3 Nov 2011 15:58:21 -0000 Received: (qmail 32451 invoked by uid 9737); 3 Nov 2011 15:58:20 -0000 Date: Thu, 03 Nov 2011 15:58:00 -0000 Message-ID: <20111103155820.32449.qmail@sourceware.org> From: zkabelac@sourceware.org To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org Subject: LVM2/lib/metadata thin_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-11/txt/msg00012.txt.bz2 CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2011-11-03 15:58:20 Modified files: lib/metadata : thin_manip.c Log message: Thin keep pool device in the same state Leave the optimalisation to be done differently and preserve availability state of the pool device. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/thin_manip.c.diff?cvsroot=lvm2&r1=1.21&r2=1.22 --- LVM2/lib/metadata/thin_manip.c 2011/11/03 14:57:04 1.21 +++ LVM2/lib/metadata/thin_manip.c 2011/11/03 15:58:20 1.22 @@ -307,10 +307,11 @@ if (activate) { /* If the pool was not yet activated, do it */ - if (!lv_is_active(lv) && - !activate_lv_excl(lv->vg->cmd, lv)) { - log_error("Failed to activate %s.", lv->name); - return 0; + if (!lv_is_active(lv)) { + if (!activate_lv_excl(lv->vg->cmd, lv)) + return_0; + if (!deactivate_lv(lv->vg->cmd, lv)) + return_0; } /* If already active, do suspend resume *