> 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.

That sounds wrong. Surely we should leave partial blocks untouched.

Paul

Reply via email to