public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
From: zkabelac@sourceware.org
To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org
Subject: LVM2 ./WHATS_NEW tools/lvresize.c
Date: Wed, 11 Apr 2012 12:40:00 -0000	[thread overview]
Message-ID: <20120411124006.755.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	zkabelac@sourceware.org	2012-04-11 12:40:04

Modified files:
	.              : WHATS_NEW 
	tools          : lvresize.c 

Log message:
	Fix lvresize for thin pool
	
	When resizing thin pool - we need to use strip info from  _tdata volume.
	In future more generic solution will be necessary once we start to support
	lvconvert (resize of stacked devices and stay properly aligned).
	For now we just allow striped or linear LV so this code will work.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.2380&r2=1.2381
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/lvresize.c.diff?cvsroot=lvm2&r1=1.153&r2=1.154

--- LVM2/WHATS_NEW	2012/04/11 12:36:37	1.2380
+++ LVM2/WHATS_NEW	2012/04/11 12:40:03	1.2381
@@ -1,5 +1,6 @@
 Version 2.02.96 - 
 ================================
+  Fix lvresize of thin pool for stipped devices.
   For lvresize round upward when specifying number of extents.
   For lvcreate with %FREE support rounding downward strip alignment.
   Change message severity to log_very_verbose for missing dev info in udev db.
--- LVM2/tools/lvresize.c	2012/04/11 12:36:38	1.153
+++ LVM2/tools/lvresize.c	2012/04/11 12:40:04	1.154
@@ -590,7 +590,10 @@
 	if ((lp->extents > lv->le_count) &&
 	    !(lp->stripes == 1 || (lp->stripes > 1 && lp->stripe_size))) {
 		/* FIXME Don't assume mirror seg will always be AREA_LV */
-		dm_list_iterate_items(seg, seg_mirrors ? &seg_lv(mirr_seg, 0)->segments : &lv->segments) {
+		/* FIXME We will need to support resize for metadata LV as well,
+		 *       and data LV could be any type (i.e. mirror)) */
+		dm_list_iterate_items(seg, seg_mirrors ? &seg_lv(mirr_seg, 0)->segments :
+				      lv_is_thin_pool(lv) ? &seg_lv(first_seg(lv), 0)->segments : &lv->segments) {
 			if (!seg_is_striped(seg))
 				continue;
 
@@ -739,13 +742,6 @@
 			log_warn("Thin pool volumes do not have filesystem.");
 			lp->resizefs = 0;
 		}
-
-		if (!lp->stripes) {
-			/* Try to use the same strip settings for underlying pool data LV */
-			lp->stripes = last_seg(seg_lv(first_seg(lv), 0))->area_count;
-			if (!lp->stripe_size)
-				lp->stripe_size = last_seg(seg_lv(first_seg(lv), 0))->stripe_size;
-		}
 	}
 
 	if ((lp->resize == LV_REDUCE) && lp->argc)


             reply	other threads:[~2012-04-11 12:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-11 12:40 zkabelac [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-04-11 12:36 zkabelac
2012-02-08 10:56 zkabelac
2012-01-09 12:31 zkabelac
2011-12-01  0:13 jbrassow
2010-03-20  3:44 snitzer
2009-01-15 14:44 wysochanski
2008-09-18 18:52 agk
2008-04-01 22:15 wysochanski
2004-11-18 19:49 agk
2004-05-24 15:58 agk
2004-05-11 18:47 agk

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=20120411124006.755.qmail@sourceware.org \
    --to=zkabelac@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).