* [RFC][PATCH] lvm2: adjust region size of mirrored log
@ 2010-06-25 17:25 Takahiro Yasui
2010-06-26 13:08 ` Takahiro Yasui
2010-06-28 14:03 ` Jonathan Brassow
0 siblings, 2 replies; 3+ messages in thread
From: Takahiro Yasui @ 2010-06-25 17:25 UTC (permalink / raw)
To: lvm-devel
Fix bz608048
The same region size is used for both mirror volume and mirrored
log volume, but when physical extent size is bigger than region size,
the size of mirror leg for mirrored log is smaller than the region size
and lvcreate command fails.
This patch adjusts a region size of mirrored log to a smaller value of
region size or physical extent size.
Signed-off-by: Takahiro Yasui <takahiro.yasui@hds.com>
---
lib/metadata/mirror.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Index: LVM2-2.02.68/lib/metadata/mirror.c
===================================================================
--- LVM2-2.02.68.orig/lib/metadata/mirror.c
+++ LVM2-2.02.68/lib/metadata/mirror.c
@@ -1816,7 +1816,9 @@ int add_mirror_images(struct cmd_context
* create and initialize mirror log
*/
if (log_count &&
- !(log_lv = _set_up_mirror_log(cmd, ah, lv, log_count, region_size,
+ !(log_lv = _set_up_mirror_log(cmd, ah, lv, log_count,
+ (region_size > lv->vg->extent_size) ?
+ lv->vg->extent_size : region_size,
alloc, mirror_in_sync()))) {
stack;
goto out_remove_images;
--
Takahiro Yasui
Hitachi Data Systems
^ permalink raw reply [flat|nested] 3+ messages in thread
* [RFC][PATCH] lvm2: adjust region size of mirrored log
2010-06-25 17:25 [RFC][PATCH] lvm2: adjust region size of mirrored log Takahiro Yasui
@ 2010-06-26 13:08 ` Takahiro Yasui
2010-06-28 14:03 ` Jonathan Brassow
1 sibling, 0 replies; 3+ messages in thread
From: Takahiro Yasui @ 2010-06-26 13:08 UTC (permalink / raw)
To: lvm-devel
Another approach to fix this problem is to extend a log volume size to a physical
extent size.
Appreciate your reviews and comments.
Thanks,
Taka
________________________________________
From: lvm-devel-bounces@redhat.com [lvm-devel-bounces at redhat.com] On Behalf Of Takahiro Yasui [takahiro.yasui at hds.com]
Sent: Friday, June 25, 2010 1:25 PM
To: lvm-devel@redhat.com
Subject: [lvm-devel] [RFC][PATCH] lvm2: adjust region size of mirrored log
Fix bz608048
The same region size is used for both mirror volume and mirrored
log volume, but when physical extent size is bigger than region size,
the size of mirror leg for mirrored log is smaller than the region size
and lvcreate command fails.
This patch adjusts a region size of mirrored log to a smaller value of
region size or physical extent size.
Signed-off-by: Takahiro Yasui <takahiro.yasui@hds.com>
---
lib/metadata/mirror.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Index: LVM2-2.02.68/lib/metadata/mirror.c
===================================================================
--- LVM2-2.02.68.orig/lib/metadata/mirror.c
+++ LVM2-2.02.68/lib/metadata/mirror.c
@@ -1816,7 +1816,9 @@ int add_mirror_images(struct cmd_context
* create and initialize mirror log
*/
if (log_count &&
- !(log_lv = _set_up_mirror_log(cmd, ah, lv, log_count, region_size,
+ !(log_lv = _set_up_mirror_log(cmd, ah, lv, log_count,
+ (region_size > lv->vg->extent_size) ?
+ lv->vg->extent_size : region_size,
alloc, mirror_in_sync()))) {
stack;
goto out_remove_images;
--
Takahiro Yasui
Hitachi Data Systems
--
lvm-devel mailing list
lvm-devel at redhat.com
https://www.redhat.com/mailman/listinfo/lvm-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* [RFC][PATCH] lvm2: adjust region size of mirrored log
2010-06-25 17:25 [RFC][PATCH] lvm2: adjust region size of mirrored log Takahiro Yasui
2010-06-26 13:08 ` Takahiro Yasui
@ 2010-06-28 14:03 ` Jonathan Brassow
1 sibling, 0 replies; 3+ messages in thread
From: Jonathan Brassow @ 2010-06-28 14:03 UTC (permalink / raw)
To: lvm-devel
ACK. I'll check this in today.
brassow
On Jun 25, 2010, at 12:25 PM, Takahiro Yasui wrote:
> Fix bz608048
>
> The same region size is used for both mirror volume and mirrored
> log volume, but when physical extent size is bigger than region size,
> the size of mirror leg for mirrored log is smaller than the region
> size
> and lvcreate command fails.
>
> This patch adjusts a region size of mirrored log to a smaller value of
> region size or physical extent size.
>
>
> Signed-off-by: Takahiro Yasui <takahiro.yasui@hds.com>
> ---
> lib/metadata/mirror.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> Index: LVM2-2.02.68/lib/metadata/mirror.c
> ===================================================================
> --- LVM2-2.02.68.orig/lib/metadata/mirror.c
> +++ LVM2-2.02.68/lib/metadata/mirror.c
> @@ -1816,7 +1816,9 @@ int add_mirror_images(struct cmd_context
> * create and initialize mirror log
> */
> if (log_count &&
> - !(log_lv = _set_up_mirror_log(cmd, ah, lv, log_count,
> region_size,
> + !(log_lv = _set_up_mirror_log(cmd, ah, lv, log_count,
> + (region_size > lv->vg->extent_size) ?
> + lv->vg->extent_size : region_size,
> alloc, mirror_in_sync()))) {
> stack;
> goto out_remove_images;
>
> --
> Takahiro Yasui
> Hitachi Data Systems
>
> --
> lvm-devel mailing list
> lvm-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/lvm-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-06-28 14:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-25 17:25 [RFC][PATCH] lvm2: adjust region size of mirrored log Takahiro Yasui
2010-06-26 13:08 ` Takahiro Yasui
2010-06-28 14:03 ` Jonathan Brassow
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.