Re: [Qemu-devel] [PATCH] block: fix physical_block_size calculation

2010-06-15 Thread Christoph Hellwig
> 512 looks wrong now that size is the number of logical blocks. The patch is entirely wrong, and only happen to work for the case I was testing by accident. I'll resend a fixed version after I created a little userspace test harness for all useful values.

Re: [Qemu-devel] [PATCH] block: fix physical_block_size calculation

2010-06-15 Thread Kevin Wolf
Am 15.06.2010 14:39, schrieb Christoph Hellwig: > Both SCSI and virtio expect the physical block size relative to the > logical block size. So get the factor first before calculating the > log2. > > Reported-by: Mike Cao > Signed-off-by: Christoph Hellwig > > Index: qemu/block_int.h > ==

[Qemu-devel] [PATCH] block: fix physical_block_size calculation

2010-06-15 Thread Christoph Hellwig
Both SCSI and virtio expect the physical block size relative to the logical block size. So get the factor first before calculating the log2. Reported-by: Mike Cao Signed-off-by: Christoph Hellwig Index: qemu/block_int.h === ---