* [LVM2 PATCH] (1/5) Separate mirror log allocation from _alloc_parallel_areas()
[not found] <45A2751E.5010707@ce.jp.nec.com>
@ 2007-01-08 17:11 ` Jun'ichi Nomura
2007-01-08 17:11 ` [LVM2 PATCH] (2/5) Fix mirror-log-only allocation failure Jun'ichi Nomura
` (3 subsequent siblings)
4 siblings, 0 replies; 5+ messages in thread
From: Jun'ichi Nomura @ 2007-01-08 17:11 UTC (permalink / raw)
To: lvm-devel
This patch moves the log allocation part from _alloc_parallel_area().
Preparation for the following patches.
No functional change.
- _alloc_parallel_area() doesn't need to allocate struct alloced_area
for log_area because it's pre-allocated in struct alloc_handle.
- consume_pv_area() has been done in the separate loop from
the loop for struct alloced_area setup.
However, consume_pv_area() just updates given pv_area and
pv_areas in areas[] are different each other.
So it can be done in the same loop with the struct alloced_area setup.
- ah->total_area_len, area_len, *ix and ah->area_multiple are not
used/updated in log_area allocation.
So operation on them can be moved before _alloc_log_area().
Thanks,
--
Jun'ichi Nomura, NEC Corporation of America
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 01-separate-mirror-log-allocation-from-alloc_parallel_area.patch
Type: text/x-patch
Size: 2553 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20070108/2d91c213/attachment.bin>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [LVM2 PATCH] (2/5) Fix mirror-log-only allocation failure
[not found] <45A2751E.5010707@ce.jp.nec.com>
2007-01-08 17:11 ` [LVM2 PATCH] (1/5) Separate mirror log allocation from _alloc_parallel_areas() Jun'ichi Nomura
@ 2007-01-08 17:11 ` Jun'ichi Nomura
2007-01-08 17:11 ` [LVM2 PATCH] (3/5) Allocate mirror log first Jun'ichi Nomura
` (2 subsequent siblings)
4 siblings, 0 replies; 5+ messages in thread
From: Jun'ichi Nomura @ 2007-01-08 17:11 UTC (permalink / raw)
To: lvm-devel
If the log-only allocation failed on the first policy,
it doesn't try the next available policy but just quit the loop and fail
because in that case both "allocated" and "new_extents" are same.
It's not correct. It should try the next policy if it's available.
The function allocating_log() is introduced to separate the logic
to determine if the log allocation is still needed.
Thanks,
--
Jun'ichi Nomura, NEC Corporation of America
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 02-fix-mirror-log-only-allocation-failure.patch
Type: text/x-patch
Size: 1284 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20070108/6f7e0360/attachment.bin>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [LVM2 PATCH] (3/5) Allocate mirror log first
[not found] <45A2751E.5010707@ce.jp.nec.com>
2007-01-08 17:11 ` [LVM2 PATCH] (1/5) Separate mirror log allocation from _alloc_parallel_areas() Jun'ichi Nomura
2007-01-08 17:11 ` [LVM2 PATCH] (2/5) Fix mirror-log-only allocation failure Jun'ichi Nomura
@ 2007-01-08 17:11 ` Jun'ichi Nomura
2007-01-08 17:11 ` [LVM2 PATCH] (4/5) Remove unnecessary prev_lvseg checks Jun'ichi Nomura
2007-01-08 17:12 ` [LVM2 PATCH] (5/5) Remove ix_offset Jun'ichi Nomura
4 siblings, 0 replies; 5+ messages in thread
From: Jun'ichi Nomura @ 2007-01-08 17:11 UTC (permalink / raw)
To: lvm-devel
This patch allows log allocation first to fix the problems that
lvconvert from linear to mirror and lvconvert from corelog to disklog
may allocate log from the same PV as mirror images.
What is the problem?
- Different (stronger) constraint should be applied to log area.
i.e. log must avoid all parallel areas, not only the ones
corresponding to the current LE.
In other words, _find_parallel_space() should use ah->parallel_areas
as whole for log allocation constraint. Whereas the part of it
(parallel_pvs) is used for the other allocation.
To fix it, this patch tries log allocation first and then others.
As a result of this change,
"--alloc anywhere" for mirror with log on the same device also starts
working. (It currently doesn't.)
Moving auto variables initialization after "restart" label
is not necessary but for avoiding future problem.
Thanks,
--
Jun'ichi Nomura, NEC Corporation of America
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 03-allocate-mirror-log-first.patch
Type: text/x-patch
Size: 5896 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20070108/d1bb0c43/attachment.bin>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [LVM2 PATCH] (4/5) Remove unnecessary prev_lvseg checks
[not found] <45A2751E.5010707@ce.jp.nec.com>
` (2 preceding siblings ...)
2007-01-08 17:11 ` [LVM2 PATCH] (3/5) Allocate mirror log first Jun'ichi Nomura
@ 2007-01-08 17:11 ` Jun'ichi Nomura
2007-01-08 17:12 ` [LVM2 PATCH] (5/5) Remove ix_offset Jun'ichi Nomura
4 siblings, 0 replies; 5+ messages in thread
From: Jun'ichi Nomura @ 2007-01-08 17:11 UTC (permalink / raw)
To: lvm-devel
In _find_parallel_space(), contiguous and cling are set
only when prev_lvseg != NULL.
So there is no need to check it again.
Thanks,
--
Jun'ichi Nomura, NEC Corporation of America
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 04-remove-unnecessary-prev_lvseg-checks.patch
Type: text/x-patch
Size: 1375 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20070108/63bfec6e/attachment.bin>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [LVM2 PATCH] (5/5) Remove ix_offset
[not found] <45A2751E.5010707@ce.jp.nec.com>
` (3 preceding siblings ...)
2007-01-08 17:11 ` [LVM2 PATCH] (4/5) Remove unnecessary prev_lvseg checks Jun'ichi Nomura
@ 2007-01-08 17:12 ` Jun'ichi Nomura
4 siblings, 0 replies; 5+ messages in thread
From: Jun'ichi Nomura @ 2007-01-08 17:12 UTC (permalink / raw)
To: lvm-devel
In _find_parallel_space(), ix_offset is used as a separator of
the areas[] array:
- 0--ix_offset : used for contiguous/cling allocation
- ix_offset--areas_size : used for other allocation
Since the both uses are exclusive, there is no need to use ix_offset.
ix can be used to count the number of areas found suitable for
the allocation.
Thanks,
--
Jun'ichi Nomura, NEC Corporation of America
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 05-remove-ix_offset.patch
Type: text/x-patch
Size: 3520 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20070108/fceb7a35/attachment.bin>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-01-08 17:12 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <45A2751E.5010707@ce.jp.nec.com>
2007-01-08 17:11 ` [LVM2 PATCH] (1/5) Separate mirror log allocation from _alloc_parallel_areas() Jun'ichi Nomura
2007-01-08 17:11 ` [LVM2 PATCH] (2/5) Fix mirror-log-only allocation failure Jun'ichi Nomura
2007-01-08 17:11 ` [LVM2 PATCH] (3/5) Allocate mirror log first Jun'ichi Nomura
2007-01-08 17:11 ` [LVM2 PATCH] (4/5) Remove unnecessary prev_lvseg checks Jun'ichi Nomura
2007-01-08 17:12 ` [LVM2 PATCH] (5/5) Remove ix_offset Jun'ichi Nomura
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.