From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32604 invoked by alias); 25 Jan 2012 09:15:45 -0000 Received: (qmail 32586 invoked by uid 9737); 25 Jan 2012 09:15:44 -0000 Date: Wed, 25 Jan 2012 09:15:00 -0000 Message-ID: <20120125091544.32584.qmail@sourceware.org> From: zkabelac@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: 2012-01/txt/msg00074.txt.bz2 CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2012-01-25 09:15:44 Modified files: lib/metadata : lv_manip.c Log message: Thin correct activation order When the message is passed only in resume path the order needs to be corrected. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/lv_manip.c.diff?cvsroot=lvm2&r1=1.351&r2=1.352 --- LVM2/lib/metadata/lv_manip.c 2012/01/25 09:14:25 1.351 +++ LVM2/lib/metadata/lv_manip.c 2012/01/25 09:15:44 1.352 @@ -4373,18 +4373,17 @@ if (((lp->activate == CHANGE_AY) || (lp->activate == CHANGE_AE) || (lp->activate == CHANGE_ALY))) { + /* At this point send message to kernel thin mda */ + pool_lv = lv_is_thin_pool(lv) ? lv : first_seg(lv)->pool_lv; + if (!update_pool_lv(pool_lv, 1)) { + stack; + goto deactivate_and_revert_new_lv; + } if (!activate_lv_excl(cmd, lv)) { log_error("Aborting. Failed to activate thin %s.", lv->name); goto deactivate_and_revert_new_lv; } - - pool_lv = lv_is_thin_pool(lv) ? lv : first_seg(lv)->pool_lv; - /* Drop any queued thin messages after activation */ - if (!update_pool_lv(pool_lv, 0)) { - stack; - goto deactivate_and_revert_new_lv; - } } } else if (lp->snapshot) { if (!activate_lv_excl(cmd, lv)) {