Drew,

One question and a few nits:


Question:
When ensuring that a new logical is at least 63 sectors from other logicals, you restrict
the check to newly created partitions:

356                 # verify there are not more than MAX_EXT_PARTS
357                 logical_list = [p for p in self._shadow if p.is_logical and 
\
358                                 p.action == "create"]

Should "preserve"d partitions (or even "use_existing_solaris2" ones) not also be
checked?



Nits:
- install_target/physical.py should import LOGICAL_ADJUSTMENT from
 shadow.physical rather than redefine itself
- test_shadow_list.py should also import LOGICAL_ADJUSTMENT from
 shadow.physical and replace about 6 hard-coded references to "63".
(No need to re-send webrev if you decide to fix these nits.)


- Dermot



On 05/26/11 20:28, Drew Fisher wrote:
Based on Dermot's and Darren's comments, I've revised the code fix for 7048119. Users may now insert partitions anywhere in the extended partition. All the necessary checks for overlap detection now include the proper buffering.

I've added a pair of unittests to cover this behavior and have also tested things by hand to ensure logical partition insertion can happen in any order (presuming they meet all other insertion criteria).

Can I get a couple of eyes on this, please?

http://cr.opensolaris.org/~drewfish/cr_7048167/

Thanks!

-Drew

On 5/25/11 7:24 PM, Drew Fisher wrote:
Good evening!

Could I please get a code review for the following CRs:

7048119 <http://monaco.us.oracle.com/detail.jsf?cr=7048119> Create logical partition failed if there is existing logical partition 7048040 <http://monaco.us.oracle.com/detail.jsf?cr=7048040> test_shadow_list.TestSliceInDisk.test_slice_entire_size_of_disk fails after 7047609 <http://monaco.us.oracle.com/detail.jsf?cr=7047609> is put back. 7048167 <http://monaco.us.oracle.com/detail.jsf?cr=7048167> Partition.resize() and Partition.change_type() are incorrectly setting bootid, in_zpool and in_vdev

http://cr.opensolaris.org/~drewfish/cr_7048167/

CR 7048119 is a major issue with logical partitions. During the initial development of targets, the logic behind correctly adding logical partitions was wrong. This fix changes how logical partitions are added to the DOC. With this fix, the start_sector of a logical partition is completely ignored. A logical partition's start_sector is adjusted to either a) 63 sectors from the start of the extended partition (if it's the first logical partition) or b) 63 sectors from the last logical partition. If the adjustment of the start_sector causes the logical partition to exceed the size of the extended partition, the proper exceptions are set in the error service for later.

I've added unit tests and tested the code by hand to verify the fix.

Thanks!

-Drew


_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss
------------------------------------------------------------------------

_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss
_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss

Reply via email to