Re: [Qemu-devel] [PATCH/RFC] block: Ensure that block size constraints are considered

2012-12-11 Thread Heinz Graalfs
On Tue, 2012-12-11 at 11:30 +0100, Kevin Wolf wrote: > Am 11.12.2012 10:58, schrieb Heinz Graalfs: > > Hi Kevin, > > > > I'm using the bdrv_pread() function during boot partition detection ... > > > > In detail: > > bdrv_pread() is called to read 32 bytes from a 2048 bytes formatted > > disk. Th

Re: [Qemu-devel] [PATCH/RFC] block: Ensure that block size constraints are considered

2012-12-11 Thread Kevin Wolf
Am 11.12.2012 10:58, schrieb Heinz Graalfs: > Hi Kevin, > > I'm using the bdrv_pread() function during boot partition detection ... > > In detail: > bdrv_pread() is called to read 32 bytes from a 2048 bytes formatted > disk. This results in setting up a read of 512 bytes (1 sector > multiplied b

Re: [Qemu-devel] [PATCH/RFC] block: Ensure that block size constraints are considered

2012-12-11 Thread Heinz Graalfs
Hi Kevin, I'm using the bdrv_pread() function during boot partition detection ... In detail: bdrv_pread() is called to read 32 bytes from a 2048 bytes formatted disk. This results in setting up a read of 512 bytes (1 sector multiplied by 512 current code in paio_submit()), which is wrong for a O

Re: [Qemu-devel] [PATCH/RFC] block: Ensure that block size constraints are considered

2012-12-10 Thread Kevin Wolf
Am 07.12.2012 21:26, schrieb Heinz Graalfs: > Hello Kevin, > > I'm resending my answer as of Nov 23rd. > > Is this still on your queue? No, it wasn't. I guess I was waiting for a new version of the patch. >>> } >>> >>> void *qemu_blockalign(BlockDriverState *bs, size_t size) >>> diff --git

Re: [Qemu-devel] [PATCH/RFC] block: Ensure that block size constraints are considered

2012-12-07 Thread Heinz Graalfs
Hello Kevin, I'm resending my answer as of Nov 23rd. Is this still on your queue? Heinz On Wed, 2012-11-21 at 10:15 +0100, Kevin Wolf wrote: > Am 21.11.2012 09:58, schrieb Christian Borntraeger: > > From: Heinz Graalfs > > > > While testing IPL code (booting) for s390x we faced some problems

Re: [Qemu-devel] [PATCH/RFC] block: Ensure that block size constraints are considered

2012-11-23 Thread Heinz Graalfs
On Wed, 2012-11-21 at 10:15 +0100, Kevin Wolf wrote: > Am 21.11.2012 09:58, schrieb Christian Borntraeger: > > From: Heinz Graalfs > > > > While testing IPL code (booting) for s390x we faced some problems > > with cache=none on dasds (4k block size) on bdrv_preads with length > > values != block

Re: [Qemu-devel] [PATCH/RFC] block: Ensure that block size constraints are considered

2012-11-22 Thread Christian Borntraeger
On 21/11/12 17:03, Paolo Bonzini wrote: > Il 21/11/2012 10:15, Kevin Wolf ha scritto: +if ((bs->open_flags & BDRV_O_NOCACHE)) { +bs->file->buffer_alignment = align; +} >> Any reason to restrict this to BDRV_O_NOCACHE? >> >> There have been patches to change the BDRV_O

Re: [Qemu-devel] [PATCH/RFC] block: Ensure that block size constraints are considered

2012-11-21 Thread Paolo Bonzini
Il 21/11/2012 10:15, Kevin Wolf ha scritto: >> > +if ((bs->open_flags & BDRV_O_NOCACHE)) { >> > +bs->file->buffer_alignment = align; >> > +} > Any reason to restrict this to BDRV_O_NOCACHE? > > There have been patches to change the BDRV_O_NOCACHE flag from the > monitor, in which c

Re: [Qemu-devel] [PATCH/RFC] block: Ensure that block size constraints are considered

2012-11-21 Thread Heinz Graalfs
On Wed, 2012-11-21 at 11:00 +0100, Christian Borntraeger wrote: > On 21/11/12 10:15, Kevin Wolf wrote: > > Am 21.11.2012 09:58, schrieb Christian Borntraeger: > >> From: Heinz Graalfs > >> > >> While testing IPL code (booting) for s390x we faced some problems > >> with cache=none on dasds (4k bloc

Re: [Qemu-devel] [PATCH/RFC] block: Ensure that block size constraints are considered

2012-11-21 Thread Christian Borntraeger
On 21/11/12 10:15, Kevin Wolf wrote: > Am 21.11.2012 09:58, schrieb Christian Borntraeger: >> From: Heinz Graalfs >> >> While testing IPL code (booting) for s390x we faced some problems >> with cache=none on dasds (4k block size) on bdrv_preads with length >> values != block size. >> >> This patch

Re: [Qemu-devel] [PATCH/RFC] block: Ensure that block size constraints are considered

2012-11-21 Thread Kevin Wolf
Am 21.11.2012 09:58, schrieb Christian Borntraeger: > From: Heinz Graalfs > > While testing IPL code (booting) for s390x we faced some problems > with cache=none on dasds (4k block size) on bdrv_preads with length > values != block size. > > This patch makes sure that bdrv_pread and friends work

[Qemu-devel] [PATCH/RFC] block: Ensure that block size constraints are considered

2012-11-21 Thread Christian Borntraeger
From: Heinz Graalfs While testing IPL code (booting) for s390x we faced some problems with cache=none on dasds (4k block size) on bdrv_preads with length values != block size. This patch makes sure that bdrv_pread and friends work fine with unaligned access even with cache=none - propagate al