public inbox for lvm2-cvs@sourceware.org help / color / mirror / Atom feed
From: mbroz@sourceware.org To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org Subject: LVM2 ./WHATS_NEW lib/metadata/lv_manip.c test/ ... Date: Mon, 01 Jun 2009 15:55:00 -0000 [thread overview] Message-ID: <20090601155508.29546.qmail@sourceware.org> (raw) CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: mbroz@sourceware.org 2009-06-01 15:55:07 Modified files: . : WHATS_NEW lib/metadata : lv_manip.c test : t-lvcreate-usage.sh Log message: Fix rename of active snapshot with virtual origin. Code must suspend/resume virtual origin too when renaming snaphsot otherwise in kernel old name remains. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1137&r2=1.1138 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/lv_manip.c.diff?cvsroot=lvm2&r1=1.179&r2=1.180 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-lvcreate-usage.sh.diff?cvsroot=lvm2&r1=1.13&r2=1.14 --- LVM2/WHATS_NEW 2009/06/01 14:43:27 1.1137 +++ LVM2/WHATS_NEW 2009/06/01 15:55:06 1.1138 @@ -1,5 +1,6 @@ Version 2.02.48 - =============================== + Fix rename of active snapshot with virtual origin. Fix convert polling to ignore LV with different UUID. Cache underlying device readahead only before activation calls. Fix segfault when calculating readahead on missing device in vgreduce. --- LVM2/lib/metadata/lv_manip.c 2009/06/01 14:23:38 1.179 +++ LVM2/lib/metadata/lv_manip.c 2009/06/01 15:55:07 1.180 @@ -1765,6 +1765,8 @@ { struct volume_group *vg = lv->vg; struct lv_names lv_names; + DM_LIST_INIT(lvs_changed); + struct lv_list lvl, lvl2; int r = 0; /* rename is not allowed on sub LVs */ @@ -1799,22 +1801,27 @@ return 0; } + lvl.lv = lv; + dm_list_add(&lvs_changed, &lvl.list); + + /* rename active virtual origin too */ + if (lv_is_cow(lv) && lv_is_virtual_origin(lvl2.lv = origin_from_cow(lv))) + dm_list_add(&lvs_changed, &lvl2.list); + log_verbose("Writing out updated volume group"); if (!vg_write(vg)) return 0; - if (!suspend_lv(cmd, lv)) { + + if (!suspend_lvs(cmd, &lvs_changed)) { vg_revert(vg); goto_out; } - if (!vg_commit(vg)) { - resume_lv(cmd, lv); - goto_out; - } + if (!(r = vg_commit(vg))) + stack; - resume_lv(cmd, lv); - r = 1; + resume_lvs(cmd, &lvs_changed); out: backup(vg); return r; --- LVM2/test/t-lvcreate-usage.sh 2009/05/13 21:29:10 1.13 +++ LVM2/test/t-lvcreate-usage.sh 2009/06/01 15:55:07 1.14 @@ -116,3 +116,10 @@ check_lv_field_ $vg/$lv regionsize "4.00M" lvremove -ff $vg +# snapshot with virtual origin works +lvcreate -s --virtualoriginsize 64M -L 32M -n $lv1 $vg +lvrename $vg/$lv1 $vg/$lv2 +lvcreate -s --virtualoriginsize 64M -L 32M -n $lv1 $vg +lvchange -a n $vg/$lv1 +lvremove $vg/$lv1 +lvremove -ff $vg
next reply other threads:[~2009-06-01 15:55 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2009-06-01 15:55 mbroz [this message] 2011-06-23 10:53 mbroz 2011-11-18 19:25 zkabelac 2012-05-01 19:21 jbrassow 2012-05-05 2:08 jbrassow
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=20090601155508.29546.qmail@sourceware.org \ --to=mbroz@sourceware.org \ --cc=lvm-devel@redhat.com \ --cc=lvm2-cvs@sourceware.org \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).