qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/5] block: add discard support


From: Christoph Hellwig
Subject: Re: [Qemu-devel] [PATCH 1/5] block: add discard support
Date: Fri, 10 Dec 2010 14:38:43 +0100
User-agent: Mutt/1.3.28i

On Thu, Dec 02, 2010 at 01:12:13PM +0100, Kevin Wolf wrote:
> >      DEFINE_PROP_UINT16("physical_block_size", _state,                   \
> >                         _conf.physical_block_size, 512),                 \
> >      DEFINE_PROP_UINT16("min_io_size", _state, _conf.min_io_size, 0),  \
> > -    DEFINE_PROP_UINT32("opt_io_size", _state, _conf.opt_io_size, 0)
> > +    DEFINE_PROP_UINT32("opt_io_size", _state, _conf.opt_io_size, 0), \
> > +    DEFINE_PROP_UINT32("discard_granularity", _state, \
> > +                       _conf.discard_granularity, 0)
> 
> Is there no way to get this value automatically?
> 
> At least for non-raw images (and it should be trivial to implement this
> in qcow2) I guess we'll want to set it to the cluster size of the image
> instead of requiring the user to set this value.

It's guest visible state, so it must not change due to migrations.  For
the current implementation all values for it work anyway - if it's
smaller than the block size we'll zero out the remainder of the block.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]