* [PATCH mirror 1/13] Add 'const' for mirror-related functions
2007-12-20 17:34 [PATCH mirror 0/13] Stacking and collapsing mirror (rev. 2) Jun'ichi Nomura
@ 2007-12-20 18:02 ` Jun'ichi Nomura
2007-12-20 18:02 ` [PATCH mirror 2/13] Misc fixes to the 'lvconvert' generalization Jun'ichi Nomura
` (11 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Jun'ichi Nomura @ 2007-12-20 18:02 UTC (permalink / raw)
To: lvm-devel
Some mirror-related functions should use 'const'.
It will save warnings when we use lv_mirror_count() from reporting
function.
Thanks,
--
Jun'ichi Nomura, NEC Corporation of America
-------------- next part --------------
A non-text attachment was scrubbed...
Name: const-mirror.patch
Type: text/x-patch
Size: 3316 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20071220/e5c1e5df/attachment.bin>
^ permalink raw reply [flat|nested] 14+ messages in thread* [PATCH mirror 2/13] Misc fixes to the 'lvconvert' generalization
2007-12-20 17:34 [PATCH mirror 0/13] Stacking and collapsing mirror (rev. 2) Jun'ichi Nomura
2007-12-20 18:02 ` [PATCH mirror 1/13] Add 'const' for mirror-related functions Jun'ichi Nomura
@ 2007-12-20 18:02 ` Jun'ichi Nomura
2007-12-20 18:02 ` [PATCH mirror 3/13] Enable layer specification in remove_layer_from_lv() Jun'ichi Nomura
` (10 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Jun'ichi Nomura @ 2007-12-20 18:02 UTC (permalink / raw)
To: lvm-devel
This small patch contains misc fixes to the lvconvert generalization
code that has been just committed to CVS.
- lv_add_mirror_lvs() should turn off VISIBLE_LV flag of
each mimage LV.
- 'struct alloc_handle' declaration in metadata-exported.h
is not needed as create_mirror_layers() was removed.
- lv_remove_mirrors() should use lv_mirror_count() instead of
seg->area_count.
Thanks,
--
Jun'ichi Nomura, NEC Corporation of America
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lvm2-lv_add_mirror-fixups.patch
Type: text/x-patch
Size: 2042 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20071220/168c4546/attachment.bin>
^ permalink raw reply [flat|nested] 14+ messages in thread* [PATCH mirror 3/13] Enable layer specification in remove_layer_from_lv()
2007-12-20 17:34 [PATCH mirror 0/13] Stacking and collapsing mirror (rev. 2) Jun'ichi Nomura
2007-12-20 18:02 ` [PATCH mirror 1/13] Add 'const' for mirror-related functions Jun'ichi Nomura
2007-12-20 18:02 ` [PATCH mirror 2/13] Misc fixes to the 'lvconvert' generalization Jun'ichi Nomura
@ 2007-12-20 18:02 ` Jun'ichi Nomura
2007-12-20 18:03 ` [PATCH mirror 4/13] lv_rename() to walk down the stacked LV Jun'ichi Nomura
` (9 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Jun'ichi Nomura @ 2007-12-20 18:02 UTC (permalink / raw)
To: lvm-devel
Added layer_lv argument to remove_layer_from_lv().
remove_layer_from_lv() has implicitly removed the top-most layer.
It won't work if the layer can be stacked.
The caller knows which layer it wants to remove.
find_parent_for_layer() will help find a parent LV for specified layer LV.
Thanks,
--
Jun'ichi Nomura, NEC Corporation of America
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lvm2-add-layer-spec-to-remove_layer_from_lv.patch
Type: text/x-patch
Size: 3914 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20071220/371afea4/attachment.bin>
^ permalink raw reply [flat|nested] 14+ messages in thread* [PATCH mirror 4/13] lv_rename() to walk down the stacked LV
2007-12-20 17:34 [PATCH mirror 0/13] Stacking and collapsing mirror (rev. 2) Jun'ichi Nomura
` (2 preceding siblings ...)
2007-12-20 18:02 ` [PATCH mirror 3/13] Enable layer specification in remove_layer_from_lv() Jun'ichi Nomura
@ 2007-12-20 18:03 ` Jun'ichi Nomura
2007-12-20 18:03 ` [PATCH mirror 5/13] lv_mirror_count() to cope with stacked mirror Jun'ichi Nomura
` (8 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Jun'ichi Nomura @ 2007-12-20 18:03 UTC (permalink / raw)
To: lvm-devel
_for_each_sub_lv() is used by lv_rename() to rename the
underlying LVs. But it currently handles only 1 layer.
Let it work recursively for more stacked LV.
Thanks,
--
Jun'ichi Nomura, NEC Corporation of America
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lvm2-stacked-lv-rename.patch
Type: text/x-patch
Size: 802 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20071220/ae173ca6/attachment.bin>
^ permalink raw reply [flat|nested] 14+ messages in thread* [PATCH mirror 5/13] lv_mirror_count() to cope with stacked mirror
2007-12-20 17:34 [PATCH mirror 0/13] Stacking and collapsing mirror (rev. 2) Jun'ichi Nomura
` (3 preceding siblings ...)
2007-12-20 18:03 ` [PATCH mirror 4/13] lv_rename() to walk down the stacked LV Jun'ichi Nomura
@ 2007-12-20 18:03 ` Jun'ichi Nomura
2007-12-20 18:03 ` [PATCH mirror 6/13] remove_mirror_images() " Jun'ichi Nomura
` (7 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Jun'ichi Nomura @ 2007-12-20 18:03 UTC (permalink / raw)
To: lvm-devel
Change lv_mirror_count() to cope with stacked mirror with resync layers.
When adding mirrors to already mirrored LV, LVM2 will stack a temporary
mirror layer for resync.
So the lv_mirror_count() should take into account these things:
- loop down through the mirror stack
- exclude the resync LV from the count
Thanks,
--
Jun'ichi Nomura, NEC Corporation of America
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lvm2-stacked-mirror-lv_mirror_count.patch
Type: text/x-patch
Size: 2114 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20071220/bf5cee0f/attachment.bin>
^ permalink raw reply [flat|nested] 14+ messages in thread* [PATCH mirror 6/13] remove_mirror_images() to cope with stacked mirror
2007-12-20 17:34 [PATCH mirror 0/13] Stacking and collapsing mirror (rev. 2) Jun'ichi Nomura
` (4 preceding siblings ...)
2007-12-20 18:03 ` [PATCH mirror 5/13] lv_mirror_count() to cope with stacked mirror Jun'ichi Nomura
@ 2007-12-20 18:03 ` Jun'ichi Nomura
2007-12-20 18:03 ` [PATCH mirror 7/13] lv_extend() " Jun'ichi Nomura
` (6 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Jun'ichi Nomura @ 2007-12-20 18:03 UTC (permalink / raw)
To: lvm-devel
Change remove_mirror_images()
- take LV as an argument, instead of LV segment, because segment-lv
relationship could change after the layer removal
- to cope with the stacked mirror LV, check the difference between
lv_mirror_count() and seg->area_count.
Iterate in this way: remove legs from the top-level mirror, if
the mirror is turned to linear, collapse one layer and restart
with remainder.
Thanks,
--
Jun'ichi Nomura, NEC Corporation of America
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lvm2-stacked-mirror-remove_mirror_images.patch
Type: text/x-patch
Size: 7968 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20071220/134f412b/attachment.bin>
^ permalink raw reply [flat|nested] 14+ messages in thread* [PATCH mirror 7/13] lv_extend() to cope with stacked mirror
2007-12-20 17:34 [PATCH mirror 0/13] Stacking and collapsing mirror (rev. 2) Jun'ichi Nomura
` (5 preceding siblings ...)
2007-12-20 18:03 ` [PATCH mirror 6/13] remove_mirror_images() " Jun'ichi Nomura
@ 2007-12-20 18:03 ` Jun'ichi Nomura
2007-12-20 18:03 ` [PATCH mirror 8/13] lvconvert to stack a temporary resync mirror on addition Jun'ichi Nomura
` (5 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Jun'ichi Nomura @ 2007-12-20 18:03 UTC (permalink / raw)
To: lvm-devel
Mirrored LV could be stacked with temporary resync layers.
So lv_extend() should walk down the stack.
Thanks,
--
Jun'ichi Nomura, NEC Corporation of America
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lvm2-stacked-mirror-extend.patch
Type: text/x-patch
Size: 2886 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20071220/227e5519/attachment.bin>
^ permalink raw reply [flat|nested] 14+ messages in thread* [PATCH mirror 8/13] lvconvert to stack a temporary resync mirror on addition
2007-12-20 17:34 [PATCH mirror 0/13] Stacking and collapsing mirror (rev. 2) Jun'ichi Nomura
` (6 preceding siblings ...)
2007-12-20 18:03 ` [PATCH mirror 7/13] lv_extend() " Jun'ichi Nomura
@ 2007-12-20 18:03 ` Jun'ichi Nomura
2007-12-20 18:03 ` [PATCH mirror 9/13] Add collapsing feature for stacked mirror Jun'ichi Nomura
` (4 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Jun'ichi Nomura @ 2007-12-20 18:03 UTC (permalink / raw)
To: lvm-devel
Allow lvconvert to add mirror by inserting a "_resync<n>" layer
and add mirrors to it.
FIXME: Limited to corelog. It'll be fixed with later patches.
Thanks,
--
Jun'ichi Nomura, NEC Corporation of America
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lvm2-stacked-mirror-add-mirror.patch
Type: text/x-patch
Size: 1744 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20071220/c0cf5df9/attachment.bin>
^ permalink raw reply [flat|nested] 14+ messages in thread* [PATCH mirror 9/13] Add collapsing feature for stacked mirror
2007-12-20 17:34 [PATCH mirror 0/13] Stacking and collapsing mirror (rev. 2) Jun'ichi Nomura
` (7 preceding siblings ...)
2007-12-20 18:03 ` [PATCH mirror 8/13] lvconvert to stack a temporary resync mirror on addition Jun'ichi Nomura
@ 2007-12-20 18:03 ` Jun'ichi Nomura
2007-12-20 18:03 ` [PATCH mirror 10/13] Add '--collapse' option to lvconvert Jun'ichi Nomura
` (3 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Jun'ichi Nomura @ 2007-12-20 18:03 UTC (permalink / raw)
To: lvm-devel
This is the main patch of this patchset.
Add collapsing feature to the stacked mirror.
dmeventd should be changed to call it when it detects the
completion of resync.
Thanks,
--
Jun'ichi Nomura, NEC Corporation of America
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lvm2-stacked-mirror-collapse-layers.patch
Type: text/x-patch
Size: 5654 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20071220/2a0a0ecb/attachment.bin>
^ permalink raw reply [flat|nested] 14+ messages in thread* [PATCH mirror 10/13] Add '--collapse' option to lvconvert
2007-12-20 17:34 [PATCH mirror 0/13] Stacking and collapsing mirror (rev. 2) Jun'ichi Nomura
` (8 preceding siblings ...)
2007-12-20 18:03 ` [PATCH mirror 9/13] Add collapsing feature for stacked mirror Jun'ichi Nomura
@ 2007-12-20 18:03 ` Jun'ichi Nomura
2007-12-20 18:03 ` [PATCH mirror 11/13] Add 'lv_mirrors' field to reporting functions Jun'ichi Nomura
` (2 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Jun'ichi Nomura @ 2007-12-20 18:03 UTC (permalink / raw)
To: lvm-devel
This patch adds '--collapse' option to lvconvert command.
Thanks,
--
Jun'ichi Nomura, NEC Corporation of America
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lvm2-stacked-mirror-lvconvert.patch
Type: text/x-patch
Size: 3384 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20071220/1bd24207/attachment.bin>
^ permalink raw reply [flat|nested] 14+ messages in thread* [PATCH mirror 11/13] Add 'lv_mirrors' field to reporting functions
2007-12-20 17:34 [PATCH mirror 0/13] Stacking and collapsing mirror (rev. 2) Jun'ichi Nomura
` (9 preceding siblings ...)
2007-12-20 18:03 ` [PATCH mirror 10/13] Add '--collapse' option to lvconvert Jun'ichi Nomura
@ 2007-12-20 18:03 ` Jun'ichi Nomura
2007-12-20 18:04 ` [PATCH mirror 12/13] Remove hardcoded "_mlog" name from deptree construction Jun'ichi Nomura
2007-12-20 18:04 ` [PATCH mirror 13/13] Allow disk logs for temporary resync mirror Jun'ichi Nomura
12 siblings, 0 replies; 14+ messages in thread
From: Jun'ichi Nomura @ 2007-12-20 18:03 UTC (permalink / raw)
To: lvm-devel
This patch adds 'lv_mirrors' field to reporting commands.
It is the number of mirrors for the LV.
Thanks,
--
Jun'ichi Nomura, NEC Corporation of America
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lvm2-stacked-mirror-report.patch
Type: text/x-patch
Size: 2769 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20071220/564297d0/attachment.bin>
^ permalink raw reply [flat|nested] 14+ messages in thread* [PATCH mirror 12/13] Remove hardcoded "_mlog" name from deptree construction
2007-12-20 17:34 [PATCH mirror 0/13] Stacking and collapsing mirror (rev. 2) Jun'ichi Nomura
` (10 preceding siblings ...)
2007-12-20 18:03 ` [PATCH mirror 11/13] Add 'lv_mirrors' field to reporting functions Jun'ichi Nomura
@ 2007-12-20 18:04 ` Jun'ichi Nomura
2007-12-20 18:04 ` [PATCH mirror 13/13] Allow disk logs for temporary resync mirror Jun'ichi Nomura
12 siblings, 0 replies; 14+ messages in thread
From: Jun'ichi Nomura @ 2007-12-20 18:04 UTC (permalink / raw)
To: lvm-devel
This patch removes "_mlog" hardcoding in deptree construction code
and use seg->log_lv instead.
Thanks,
--
Jun'ichi Nomura, NEC Corporation of America
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lvm2-deptree-generalize-mlog.patch
Type: text/x-patch
Size: 974 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20071220/f8277303/attachment.bin>
^ permalink raw reply [flat|nested] 14+ messages in thread* [PATCH mirror 13/13] Allow disk logs for temporary resync mirror
2007-12-20 17:34 [PATCH mirror 0/13] Stacking and collapsing mirror (rev. 2) Jun'ichi Nomura
` (11 preceding siblings ...)
2007-12-20 18:04 ` [PATCH mirror 12/13] Remove hardcoded "_mlog" name from deptree construction Jun'ichi Nomura
@ 2007-12-20 18:04 ` Jun'ichi Nomura
12 siblings, 0 replies; 14+ messages in thread
From: Jun'ichi Nomura @ 2007-12-20 18:04 UTC (permalink / raw)
To: lvm-devel
With the previous patch ("12/13"), we can use multiple disk logs
in the LV.
So unlock the use of disk log for added mirror.
Thanks,
--
Jun'ichi Nomura, NEC Corporation of America
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lvm2-stacked-mirror-multi-mlogs.patch
Type: text/x-patch
Size: 1652 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20071220/d9d6c7a6/attachment.bin>
^ permalink raw reply [flat|nested] 14+ messages in thread