On Fri 07 Oct 2016 10:14:32 AM CEST, Kevin Wolf wrote:

>> Maybe pass a negative integer to indicate percentage, so string is not 
>> required?:
>> l2-cache-size=-100    (l2-cache-size=max, covers entire drive)
>> l2-cache-size=-50     (l2-cache-size=50% of max, covers half of drive)
>> l2-cache-size=2097152 (l2-cache-size=2M)
>
> No, this is the kind of magic that is best to avoid.
>
> If you want to have two different ways to configure the cache, make it
> two different options.

I agree. Still, I would like to know what's the use case you (Frank, Ed)
are thinking about:

- Are we talking about command-line options, QMP, or both?
- Do you know the size of the disk image or you want to be able to set
  the cache size without having access to that information? In other
  words, what's preventing you from calculating the cache size that you
  need?

Berto

Reply via email to