public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
From: jbrassow@sourceware.org
To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org
Subject: LVM2 ./WHATS_NEW lib/metadata/metadata-exporte ...
Date: Thu, 01 Dec 2011 00:09:00 -0000 [thread overview]
Message-ID: <20111201000938.24032.qmail@sourceware.org> (raw)
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: jbrassow@sourceware.org 2011-12-01 00:09:35
Modified files:
. : WHATS_NEW
lib/metadata : metadata-exported.h raid_manip.c
tools : lvrename.c
Log message:
Do not allow users to change the name of RAID sub-LVs or the name of the
RAID LV if it is tracking changes for a split image.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.2200&r2=1.2201
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/metadata-exported.h.diff?cvsroot=lvm2&r1=1.224&r2=1.225
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/raid_manip.c.diff?cvsroot=lvm2&r1=1.18&r2=1.19
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/lvrename.c.diff?cvsroot=lvm2&r1=1.58&r2=1.59
--- LVM2/WHATS_NEW 2011/12/01 00:05:40 1.2200
+++ LVM2/WHATS_NEW 2011/12/01 00:09:34 1.2201
@@ -1,5 +1,7 @@
Version 2.02.89 -
==================================
+ Don't allow name change of RAID LV while tracking a split image.
+ Do not allow users to change the name of RAID sub-LVs
Do not allow users to change permissions on RAID sub-LVs
Support the ability to replace specific devices in a RAID array via lvconvert.
Add activation/use_linear_target enabled by default.
--- LVM2/lib/metadata/metadata-exported.h 2011/11/30 02:20:13 1.224
+++ LVM2/lib/metadata/metadata-exported.h 2011/12/01 00:09:35 1.225
@@ -780,6 +780,7 @@
/* -- metadata/replicator_manip.c */
/* ++ metadata/raid_manip.c */
+int lv_is_raid_with_tracking(const struct logical_volume *lv);
uint32_t lv_raid_image_count(const struct logical_volume *lv);
int lv_raid_change_image_count(struct logical_volume *lv,
uint32_t new_count, struct dm_list *pvs);
--- LVM2/lib/metadata/raid_manip.c 2011/11/30 02:02:11 1.18
+++ LVM2/lib/metadata/raid_manip.c 2011/12/01 00:09:35 1.19
@@ -26,6 +26,22 @@
#define RAID_REGION_SIZE 1024
+int lv_is_raid_with_tracking(const struct logical_volume *lv)
+{
+ uint32_t s;
+ struct lv_segment *seg;
+
+ if (lv->status & RAID) {
+ seg = first_seg(lv);
+
+ for (s = 0; s < seg->area_count; s++)
+ if (lv_is_visible(seg_lv(seg, s)) &&
+ !(seg_lv(seg, s)->status & LVM_WRITE))
+ return 1;
+ }
+ return 0;
+}
+
uint32_t lv_raid_image_count(const struct logical_volume *lv)
{
struct lv_segment *seg = first_seg(lv);
--- LVM2/tools/lvrename.c 2011/08/10 20:25:31 1.58
+++ LVM2/tools/lvrename.c 2011/12/01 00:09:35 1.59
@@ -115,6 +115,21 @@
goto error;
}
+ if (lvl->lv->status & (RAID_IMAGE | RAID_META)) {
+ log_error("Cannot rename a RAID %s directly",
+ (lvl->lv->status & RAID_IMAGE) ? "image" :
+ "metadata area");
+ r = ECMD_FAILED;
+ goto error;
+ }
+
+ if (lv_is_raid_with_tracking(lvl->lv)) {
+ log_error("Cannot rename %s while it is tracking a split image",
+ lvl->lv->name);
+ r = ECMD_FAILED;
+ goto error;
+ }
+
if (!lv_rename(cmd, lvl->lv, lv_name_new))
goto error;
next reply other threads:[~2011-12-01 0:09 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-01 0:09 jbrassow [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-10-28 20:12 zkabelac
2011-10-07 14:56 jbrassow
2011-09-14 9:57 zkabelac
2011-09-07 8:34 zkabelac
2011-08-18 19:43 jbrassow
2011-08-18 19:34 jbrassow
2011-03-11 14:56 prajnoha
2011-03-02 20:00 mbroz
2011-02-25 14:02 prajnoha
2010-05-21 14:07 zkabelac
2010-05-21 12:55 zkabelac
2010-05-21 12:52 zkabelac
2010-05-14 15:19 jbrassow
2010-03-16 15:30 agk
2010-03-16 14:37 agk
2009-07-14 2:19 wysochanski
2009-06-05 20:00 mbroz
2009-06-01 14:43 mbroz
2009-02-03 16:19 wysochanski
2008-04-23 14:33 wysochanski
2008-02-13 20:01 meyering
2008-01-18 22:02 agk
2008-01-16 18:15 agk
2008-01-07 20:42 mbroz
2007-11-15 2:20 agk
2007-10-12 14:08 wysochanski
2007-09-20 21:39 wysochanski
2007-08-30 20:30 wysochanski
2007-08-21 17:38 wysochanski
2007-07-23 17:27 wysochanski
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=20111201000938.24032.qmail@sourceware.org \
--to=jbrassow@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: link
Be 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).