(1/5) Separate mirror log allocation from _alloc_parallel_areas()
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 (1/5) Separate mirror log allocation from _alloc_parallel_areas()
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,
Signature · 9 lines
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>
PATCH 1/1 (2/5) Fix mirror-log-only allocation failure
In reply to a message not in the archiveIf 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,
Signature · 9 lines
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>
PATCH 1/1 (3/5) Allocate mirror log first
In reply to a message not in the archiveThis 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,
Signature · 9 lines
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>
PATCH 1/1 (4/5) Remove unnecessary prev_lvseg checks
In reply to a message not in the archiveIn _find_parallel_space(), contiguous and cling are set only when prev_lvseg != NULL.
So there is no need to check it again.
Thanks,
Signature · 8 lines
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>
PATCH 1/1 (5/5) Remove ix_offset
In reply to a message not in the archiveIn _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,
Signature · 10 lines
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>