Sanjay Nadkarni wrote: > Shidokht Yadegari wrote: >> Hi Sanjay, >> >> I would not suggest checking the size of slice 2 against 1TB to >> decide whether we >> need to use the new interfaces or not. If the disk is larger than 1TB >> (in capacity), we >> need to use the new interfaces. I believe checking slice 2's size >> instead of real capacity of the >> disk can cause failures on disks larger than 1 TB but with a vtoc >> limited to 1TB in size, e.g >> disk > 1TB with a Solaris fdisk partition that is < 1TB. > At line 1663 the DKIOCGGEOM is called to get the geometry of the > desk. Then at line 1718 slice 2 is set to capacity of the entire > drive based on geometry of the disk. Wouldn't that cover the case > you are concerned about or should we be instead > calling DKIOCG_PHYGEOM ? It seems to me line 1718 is setting slice 2 to the label capacity and not the capacity of entire drive. DKIOCGGEOM returns label geometry . Even if we use DKIOCG_PHYGEOM, capacity of the drive can not be calculated from it. I suggest DKIOCGMEDIAINFO for capacity of the drive.
> >> >> Also when checking against 1TB, I'd suggest considering the case of >> == 0x80000000 >> same as larger than 1TB. The whole vtoc vs extvtoc is really about >> the sign bit in size/start... >> > Ok. So the check should be < (uint32_t)(0x80000000) ? sound good to me. Thanks --shidokht > > -Sanjay > >> Thanks >> --shidokht >> >> >> Sanjay Nadkarni wrote: >>> >>> Please review this blocker for bug. >>> >>> http://cr.opensolaris.org/~nadkarni/bugfix5106/webrev/ >>> >>> -Sanjay >>> >> >
