From: zkabelac@sourceware.org <zkabelac@sourceware.org>
To: lvm-devel@redhat.com
Subject: LVM2 ./WHATS_NEW tools/lvresize.c
Date: 11 Apr 2012 12:36:39 -0000 [thread overview]
Message-ID: <20120411123639.8537.qmail@sourceware.org> (raw)
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac at sourceware.org 2012-04-11 12:36:38
Modified files:
. : WHATS_NEW
tools : lvresize.c
Log message:
Lvresize rounds upward
When given lvresize new size - round upward for stripes - unless we use % and
we are at the border of free extents.
This patch is not a complete fix and few more cases will need special care.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.2379&r2=1.2380
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/lvresize.c.diff?cvsroot=lvm2&r1=1.152&r2=1.153
--- LVM2/WHATS_NEW 2012/04/11 12:33:34 1.2379
+++ LVM2/WHATS_NEW 2012/04/11 12:36:37 1.2380
@@ -1,5 +1,6 @@
Version 2.02.96 -
================================
+ 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.
Fix problems when specifying PVs during RAID down-converts.
--- LVM2/tools/lvresize.c 2012/04/11 12:30:48 1.152
+++ LVM2/tools/lvresize.c 2012/04/11 12:36:38 1.153
@@ -676,7 +676,11 @@
size_rest = seg_size % (lp->stripes * stripesize_extents);
/* Round toward the original size. */
- if (size_rest && lp->extents < lv->le_count) {
+ if (size_rest &&
+ ((lp->extents < lv->le_count) ||
+ !lp->percent ||
+ (vg->free_count >= (lp->extents - lv->le_count - size_rest +
+ (lp->stripes * stripesize_extents))))) {
log_print("Rounding size (%d extents) up to stripe "
"boundary size for segment (%d extents)",
lp->extents, lp->extents - size_rest +
@@ -689,7 +693,6 @@
lp->extents, lp->extents - size_rest);
lp->extents = lp->extents - size_rest;
}
-
}
if (lp->extents < lv->le_count) {
next reply other threads:[~2012-04-11 12:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-11 12:36 zkabelac [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-04-11 12:40 LVM2 ./WHATS_NEW tools/lvresize.c 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: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=20120411123639.8537.qmail@sourceware.org \
--to=zkabelac@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.