Re: [Qemu-devel] [PATCH] block: Avoid unecessary drv->bdrv_getlength() calls

2013-11-04 Thread Fam Zheng
On 11/04/2013 07:18 PM, Kevin Wolf wrote: Am 04.11.2013 um 08:24 hat Fam Zheng geschrieben: On Tue 29 Oct 2013 08:12:38 PM CST, Kevin Wolf wrote: Am 29.10.2013 um 13:02 hat Paolo Bonzini geschrieben: Il 29/10/2013 12:35, Kevin Wolf ha scritto: The block layer generally keeps the size of an

Re: [Qemu-devel] [PATCH] block: Avoid unecessary drv->bdrv_getlength() calls

2013-11-04 Thread Kevin Wolf
Am 04.11.2013 um 08:24 hat Fam Zheng geschrieben: > > > On Tue 29 Oct 2013 08:12:38 PM CST, Kevin Wolf wrote: > >Am 29.10.2013 um 13:02 hat Paolo Bonzini geschrieben: > >>Il 29/10/2013 12:35, Kevin Wolf ha scritto: > >>>The block layer generally keeps the size of an image cached in > >>>bs->total

Re: [Qemu-devel] [PATCH] block: Avoid unecessary drv->bdrv_getlength() calls

2013-11-03 Thread Fam Zheng
On Tue 29 Oct 2013 08:12:38 PM CST, Kevin Wolf wrote: Am 29.10.2013 um 13:02 hat Paolo Bonzini geschrieben: Il 29/10/2013 12:35, Kevin Wolf ha scritto: The block layer generally keeps the size of an image cached in bs->total_sectors so that it doesn't have to perform expensive operations to g

Re: [Qemu-devel] [PATCH] block: Avoid unecessary drv->bdrv_getlength() calls

2013-10-29 Thread Kevin Wolf
Am 29.10.2013 um 13:02 hat Paolo Bonzini geschrieben: > Il 29/10/2013 12:35, Kevin Wolf ha scritto: > > The block layer generally keeps the size of an image cached in > > bs->total_sectors so that it doesn't have to perform expensive > > operations to get the size whenever it needs it. > > > > Thi

Re: [Qemu-devel] [PATCH] block: Avoid unecessary drv->bdrv_getlength() calls

2013-10-29 Thread Paolo Bonzini
Il 29/10/2013 12:35, Kevin Wolf ha scritto: > The block layer generally keeps the size of an image cached in > bs->total_sectors so that it doesn't have to perform expensive > operations to get the size whenever it needs it. > > This doesn't work however when using a backend that can change its si

[Qemu-devel] [PATCH] block: Avoid unecessary drv->bdrv_getlength() calls

2013-10-29 Thread Kevin Wolf
The block layer generally keeps the size of an image cached in bs->total_sectors so that it doesn't have to perform expensive operations to get the size whenever it needs it. This doesn't work however when using a backend that can change its size without qemu being aware of it, i.e. passthrough of