From: mbroz@sourceware.org <mbroz@sourceware.org>
To: lvm-devel@redhat.com
Subject: LVM2 ./WHATS_NEW lib/mirror/mirrored.c
Date: 18 Nov 2009 16:48:11 -0000 [thread overview]
Message-ID: <20091118164811.30581.qmail@sourceware.org> (raw)
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: mbroz at sourceware.org 2009-11-18 16:48:10
Modified files:
. : WHATS_NEW
lib/mirror : mirrored.c
Log message:
Fix pvmove region_size overflow for very large PVs.
Fixes problem reported in
https://www.redhat.com/archives/dm-devel/2009-November/msg00104.html
The region size multiplication can overflow when using 32bit integer.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1314&r2=1.1315
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/mirror/mirrored.c.diff?cvsroot=lvm2&r1=1.64&r2=1.65
--- LVM2/WHATS_NEW 2009/11/04 14:47:27 1.1314
+++ LVM2/WHATS_NEW 2009/11/18 16:48:10 1.1315
@@ -1,5 +1,6 @@
Version 2.02.55 -
===================================
+ Fix pvmove region_size oveflow for very large PVs.
Fix lvcreate and lvresize processing of %PVS argument.
Tidy some uses of arg_count and introduce arg_is_set.
Export outnl and indent functions for modules.
--- LVM2/lib/mirror/mirrored.c 2009/10/01 00:35:30 1.64
+++ LVM2/lib/mirror/mirrored.c 2009/11/18 16:48:10 1.65
@@ -290,7 +290,7 @@
uint32_t area_count = seg->area_count;
unsigned start_area = 0u;
int mirror_status = MIRR_RUNNING;
- uint32_t region_size, region_max;
+ uint32_t region_size;
int r;
if (!*target_state)
@@ -333,18 +333,11 @@
return 0;
}
region_size = seg->region_size;
- } else {
- /* Find largest power of 2 region size unit we can use */
- region_max = (1 << (ffs((int)seg->area_len) - 1)) *
- seg->lv->vg->extent_size;
-
- region_size = mirr_state->default_region_size;
- if (region_max < region_size) {
- region_size = region_max;
- log_verbose("Using reduced mirror region size of %u sectors",
- region_size);
- }
- }
+
+ } else
+ region_size = adjusted_mirror_region_size(seg->lv->vg->extent_size,
+ seg->area_len,
+ mirr_state->default_region_size);
if (!dm_tree_node_add_mirror_target(node, len))
return_0;
next reply other threads:[~2009-11-18 16:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-18 16:48 mbroz [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-02-23 22:30 LVM2 ./WHATS_NEW lib/mirror/mirrored.c zkabelac
2012-02-13 11:07 zkabelac
2011-06-17 14:17 zkabelac
2010-12-01 13:01 zkabelac
2010-05-24 16:30 agk
2008-07-31 14:43 agk
2008-01-16 15:24 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=20091118164811.30581.qmail@sourceware.org \
--to=mbroz@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.