All of lore.kernel.org
 help / color / mirror / Atom feed
From: jbrassow@sourceware.org <jbrassow@sourceware.org>
To: lvm-devel@redhat.com
Subject: LVM2 ./WHATS_NEW tools/lvresize.c
Date: 1 Dec 2011 00:13:17 -0000	[thread overview]
Message-ID: <20111201001317.24696.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	jbrassow at sourceware.org	2011-12-01 00:13:16

Modified files:
	.              : WHATS_NEW 
	tools          : lvresize.c 

Log message:
	Don't allow size change of RAID LV that is tracking changes for a split image
	Don't allow size change of RAID sub-LVs independently

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.2201&r2=1.2202
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/lvresize.c.diff?cvsroot=lvm2&r1=1.143&r2=1.144

--- LVM2/WHATS_NEW	2011/12/01 00:09:34	1.2201
+++ LVM2/WHATS_NEW	2011/12/01 00:13:16	1.2202
@@ -1,7 +1,9 @@
 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
+  Don't allow size change of RAID LV that is tracking changes for a split image
+  Don't allow size change of RAID sub-LVs independently
+  Don't allow name change of RAID LV that is tracking changes for a split image
+  Do not allow users to change the name of RAID sub-LVs independently
   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/tools/lvresize.c	2011/11/08 12:19:53	1.143
+++ LVM2/tools/lvresize.c	2011/12/01 00:13:16	1.144
@@ -361,6 +361,19 @@
 		return ECMD_FAILED;
 	}
 
+	if (lvl->lv->status & (RAID_IMAGE | RAID_META)) {
+		log_error("Cannot resize a RAID %s directly",
+			  (lvl->lv->status & RAID_IMAGE) ? "image" :
+			  "metadata area");
+		return ECMD_FAILED;
+	}
+
+	if (lv_is_raid_with_tracking(lvl->lv)) {
+		log_error("Cannot resize %s while it is tracking a split image",
+			  lvl->lv->name);
+		return ECMD_FAILED;
+	}
+
 	if (arg_count(cmd, stripes_ARG)) {
 		if (vg->fid->fmt->features & FMT_SEGMENTS)
 			lp->stripes = arg_uint_value(cmd, stripes_ARG, 1);



             reply	other threads:[~2011-12-01  0:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-01  0:13 jbrassow [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-04-11 12:40 LVM2 ./WHATS_NEW tools/lvresize.c zkabelac
2012-04-11 12:36 zkabelac
2012-02-08 10:56 zkabelac
2012-01-09 12:31 zkabelac
2010-03-20  3:44 snitzer
2009-01-15 14:44 wysochanski
2008-09-18 18:51 agk
2008-04-01 22:15 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=20111201001317.24696.qmail@sourceware.org \
    --to=jbrassow@sourceware.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.