Re: [Qemu-devel] [PATCH for-1.2] qed: refuse unaligned zero writes with a backing file

2012-08-29 Thread Paolo Bonzini
Il 29/08/2012 09:53, Stefan Hajnoczi ha scritto: > I think this patch could be used as the basis for > something that handles the first and last clusters one-at-a-time and > does the middle clusters in a single L2 update. > > I'm not going to implement that right now because I prefer the simple >

Re: [Qemu-devel] [PATCH for-1.2] qed: refuse unaligned zero writes with a backing file

2012-08-29 Thread Stefan Hajnoczi
On Tue, Aug 28, 2012 at 04:23:31PM +0200, Paolo Bonzini wrote: > Il 28/08/2012 15:37, Stefan Hajnoczi ha scritto: > >> > The "right fix" would not be much more complex though, something like > >> > this, right? > >> > (untested). > > Yes but it's more complicated. To do a really good job we shoul

Re: [Qemu-devel] [PATCH for-1.2] qed: refuse unaligned zero writes with a backing file

2012-08-28 Thread Paolo Bonzini
Il 28/08/2012 15:37, Stefan Hajnoczi ha scritto: >> > The "right fix" would not be much more complex though, something like >> > this, right? >> > (untested). > Yes but it's more complicated. To do a really good job we should > slice off the first/last clusters if they are unaligned, handle them

Re: [Qemu-devel] [PATCH for-1.2] qed: refuse unaligned zero writes with a backing file

2012-08-28 Thread Kevin Wolf
Am 28.08.2012 15:25, schrieb Paolo Bonzini: > Il 28/08/2012 15:04, Stefan Hajnoczi ha scritto: >> Zero writes have cluster granularity in QED. Therefore they can only be >> used to zero entire clusters. >> >> If the zero write request leaves sectors untouched, zeroing the entire >> cluster would o

Re: [Qemu-devel] [PATCH for-1.2] qed: refuse unaligned zero writes with a backing file

2012-08-28 Thread Stefan Hajnoczi
On Tue, Aug 28, 2012 at 2:25 PM, Paolo Bonzini wrote: > Il 28/08/2012 15:04, Stefan Hajnoczi ha scritto: >> Zero writes have cluster granularity in QED. Therefore they can only be >> used to zero entire clusters. >> >> If the zero write request leaves sectors untouched, zeroing the entire >> clus

Re: [Qemu-devel] [PATCH for-1.2] qed: refuse unaligned zero writes with a backing file

2012-08-28 Thread Paolo Bonzini
Il 28/08/2012 15:04, Stefan Hajnoczi ha scritto: > Zero writes have cluster granularity in QED. Therefore they can only be > used to zero entire clusters. > > If the zero write request leaves sectors untouched, zeroing the entire > cluster would obscure the backing file. Instead return -ENOTSUP,

[Qemu-devel] [PATCH for-1.2] qed: refuse unaligned zero writes with a backing file

2012-08-28 Thread Stefan Hajnoczi
Zero writes have cluster granularity in QED. Therefore they can only be used to zero entire clusters. If the zero write request leaves sectors untouched, zeroing the entire cluster would obscure the backing file. Instead return -ENOTSUP, which is handled by block.c:bdrv_co_do_write_zeroes() and