cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nitin Mehta <Nitin.Me...@citrix.com>
Subject Re: Resize Volume Question
Date Sat, 12 Jul 2014 02:47:10 GMT
Mike - Would you mind creating a bug for it or better still adding a
comment in the code as a //TODO - standardize it if you can't fix it ?
I guess currently dev writing new code doesn't have a good reference
whether to take it as bytes or in GB. That¹s why you are seeing both
varieties.

Thanks,
-Nitin

On 11/07/14 6:33 PM, "Mike Tutkowski" <mike.tutkowski@solidfire.com> wrote:

>Sure, that makes sense - thanks.
>
>It's too bad we don't really have a standard for our API in terms of how
>volume sizes are referenced. It seems sometimes we use bytes while other
>times we use GB. I was thinking the units were bytes here, but they are
>GB.
>
>
>On Fri, Jul 11, 2014 at 3:55 PM, Nitin Mehta <Nitin.Mehta@citrix.com>
>wrote:
>
>> Probably converting from GB to bytes ? I recall doing that for creating
>> volumes from custom disk offering.
>>
>> On 11/07/14 2:07 PM, "Mike Tutkowski" <mike.tutkowski@solidfire.com>
>> wrote:
>>
>> >Hi,
>> >
>> >In the resize-volume command, I see this logic:
>> >
>> >            if (diskOffering.isCustomized() ||
>> >volume.getVolumeType().equals(Volume.Type.ROOT)) {
>> >
>> >                newSize = cmd.getSize();
>> >
>> >
>> >                if (newSize != null) {
>> >
>> >                    newSize = (newSize << 30);
>> >
>> >                }
>> >
>> >            }
>> >
>> >Any thoughts on why we are shifting bits 30 places to the left?
>> >
>> >I don't recall us doing this in other places for long values?
>> >
>> >This is in VolumeApiServiceImpl.resizeVolume.
>> >
>> >Thanks!
>> >--
>> >*Mike Tutkowski*
>> >*Senior CloudStack Developer, SolidFire Inc.*
>> >e: mike.tutkowski@solidfire.com
>> >o: 303.746.7302
>> >Advancing the way the world uses the cloud
>> ><http://solidfire.com/solution/overview/?video=play>* *
>>
>>
>
>
>-- 
>*Mike Tutkowski*
>*Senior CloudStack Developer, SolidFire Inc.*
>e: mike.tutkowski@solidfire.com
>o: 303.746.7302
>Advancing the way the world uses the cloud
><http://solidfire.com/solution/overview/?video=play>**


Mime
View raw message