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

2010-12-13 Thread Paul Brook
> On Sat, Dec 11, 2010 at 12:50:20PM +, Paul Brook wrote: > > > 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. > > > >

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

2010-12-13 Thread Christoph Hellwig
On Sat, Dec 11, 2010 at 12:50:20PM +, Paul Brook wrote: > > 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

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

2010-12-11 Thread Paul Brook
> 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), > > > \ > > > > > >

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

2010-12-10 Thread Christoph Hellwig
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), \ > >

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

2010-12-02 Thread Kevin Wolf
Am 01.12.2010 16:35, schrieb Christoph Hellwig: > Add a new bdrv_discard method to free blocks in a mapping image, and a new > drive property to set the granularity for these discard. If no discard > granularity support is set discard support is disabled. > > Signed-off-by: Christoph Hellwig >

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

2010-12-01 Thread Christoph Hellwig
Add a new bdrv_discard method to free blocks in a mapping image, and a new drive property to set the granularity for these discard. If no discard granularity support is set discard support is disabled. Signed-off-by: Christoph Hellwig Index: qemu/block.c

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

2010-11-25 Thread Stefan Hajnoczi
On Thu, Nov 25, 2010 at 1:57 PM, Christoph Hellwig wrote: > +int bdrv_discard(BlockDriverState *bs, int64_t sector_num, int nb_sectors) > +{ > +    if (!bs->drv || !bs->drv->bdrv_discard) > +        return 0; !bs->drv is normally -ENOMEDIUM. Perhaps we shouldn't lump it in with !bs->drv->bdrv_di

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

2010-11-25 Thread malc
On Thu, 25 Nov 2010, Christoph Hellwig wrote: > Add a new bdrv_discard method to free blocks in a mapping image, and a new > drive property to set the granularity for these discard. If no discard > granularity support is set discard support is disabled. > > Signed-off-by: Christoph Hellwig > >

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

2010-11-25 Thread Christoph Hellwig
Add a new bdrv_discard method to free blocks in a mapping image, and a new drive property to set the granularity for these discard. If no discard granularity support is set discard support is disabled. Signed-off-by: Christoph Hellwig Index: qemu/block.c