mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
use qemu_blockalign consistently
Use qemu_blockalign for all allocations in the block layer. This allows increasing the required alignment, which is need to support O_DIRECT on devices with large block sizes. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
a655211ac6
commit
72aef7318f
5 changed files with 9 additions and 8 deletions
|
@ -61,7 +61,7 @@ static void *qemu_io_alloc(size_t len, int pattern)
|
|||
|
||||
if (misalign)
|
||||
len += MISALIGN_OFFSET;
|
||||
buf = qemu_memalign(512, len);
|
||||
buf = qemu_blockalign(bs, len);
|
||||
memset(buf, pattern, len);
|
||||
if (misalign)
|
||||
buf += MISALIGN_OFFSET;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue