From: Zdenek Kabelac <zkabelac@fedoraproject.org>
To: lvm-devel@redhat.com
Subject: master - thin: shuffle code
Date: Sun, 2 Dec 2012 17:02:29 +0000 (UTC) [thread overview]
Message-ID: <20121202170229.38C2BA0D87@fedorahosted.org> (raw)
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=f0da2842cfec05753154e5516f01e0dfd7331640
Commit: f0da2842cfec05753154e5516f01e0dfd7331640
Parent: 0be8a9126f9e6e66bce186192fedbb5d841007f2
Author: Zdenek Kabelac <zkabelac@redhat.com>
AuthorDate: Sun Dec 2 16:27:39 2012 +0100
Committer: Zdenek Kabelac <zkabelac@redhat.com>
CommitterDate: Sun Dec 2 17:56:44 2012 +0100
thin: shuffle code
Reorder code lines for next patch.
---
tools/lvconvert.c | 26 +++++++++++++-------------
1 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/tools/lvconvert.c b/tools/lvconvert.c
index 76588d2..a75a7fc 100644
--- a/tools/lvconvert.c
+++ b/tools/lvconvert.c
@@ -1917,12 +1917,6 @@ static int _lvconvert_thinpool(struct cmd_context *cmd,
return 0;
}
- /* Rename deactivated metadata LV to have _tmeta suffix */
- /* Implicit checks if metadata_lv is visible */
- if (strcmp(metadata_lv->name, name) &&
- !lv_rename_update(cmd, metadata_lv, name, 0))
- return_0;
-
/*
* Since we wish to have underlaying dev, to match _tdata
* rename data LV first, also checks for visible LV
@@ -1940,18 +1934,24 @@ static int _lvconvert_thinpool(struct cmd_context *cmd,
seg->segtype = lp->segtype;
seg->lv->status |= THIN_POOL;
- seg->chunk_size = lp->chunk_size;
- seg->zero_new_blocks = lp->zero ? 1 : 0;
- seg->discards = lp->discards;
+ /* Drop reference as attach_pool_data_lv() takes it again */
+ remove_seg_from_segs_using_this_lv(data_lv, seg);
+ if (!attach_pool_data_lv(seg, data_lv))
+ return_0;
+
seg->low_water_mark = 0;
seg->transaction_id = 0;
+ seg->chunk_size = lp->chunk_size;
+ seg->discards = lp->discards;
+ seg->zero_new_blocks = lp->zero ? 1 : 0;
- if (!attach_pool_metadata_lv(seg, metadata_lv))
+ /* Rename deactivated metadata LV to have _tmeta suffix */
+ /* Implicit checks if metadata_lv is visible */
+ if (strcmp(metadata_lv->name, name) &&
+ !lv_rename_update(cmd, metadata_lv, name, 0))
return_0;
- /* Drop reference as attach_pool_data_lv() takes it again */
- remove_seg_from_segs_using_this_lv(data_lv, seg);
- if (!attach_pool_data_lv(seg, data_lv))
+ if (!attach_pool_metadata_lv(seg, metadata_lv))
return_0;
if (!vg_write(pool_lv->vg) || !vg_commit(pool_lv->vg))
reply other threads:[~2012-12-02 17:02 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121202170229.38C2BA0D87@fedorahosted.org \
--to=zkabelac@fedoraproject.org \
--cc=lvm-devel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.