[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/5] block: add discard support
From: |
Paul Brook |
Subject: |
Re: [Qemu-devel] [PATCH 1/5] block: add discard support |
Date: |
Sat, 11 Dec 2010 12:50:20 +0000 |
User-agent: |
KMail/1.13.5 (Linux/2.6.36-trunk-amd64; KDE/4.4.5; x86_64; ; ) |
> 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
[Qemu-devel] [PATCH 2/5] scsi-disk: support WRITE SAME (16) with unmap bit, Christoph Hellwig, 2010/12/01
[Qemu-devel] [PATCH 3/5] make dma_bdrv_io available to drivers, Christoph Hellwig, 2010/12/01
[Qemu-devel] [PATCH 4/5] ide: add TRIM support, Christoph Hellwig, 2010/12/01