aboutsummaryrefslogtreecommitdiff
path: root/qemu-nbd.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2010-09-12 23:42:56 +0200
committerKevin Wolf <kwolf@redhat.com>2010-09-21 15:39:42 +0200
commit72aef7318f54f0ec8c84c2bf2bb8edc5702d7dd0 (patch)
tree57ce22e51c76063432eca60190f7f44d015a2b80 /qemu-nbd.c
parenta655211ac6d379c5b0813761e5d11415780f41fd (diff)
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>
Diffstat (limited to 'qemu-nbd.c')
-rw-r--r--qemu-nbd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/qemu-nbd.c b/qemu-nbd.c
index 91b569f8e6..923a3bfd34 100644
--- a/qemu-nbd.c
+++ b/qemu-nbd.c
@@ -446,7 +446,7 @@ int main(int argc, char **argv)
max_fd = sharing_fds[0];
nb_fds++;
- data = qemu_memalign(512, NBD_BUFFER_SIZE);
+ data = qemu_blockalign(bs, NBD_BUFFER_SIZE);
if (data == NULL)
errx(EXIT_FAILURE, "Cannot allocate data buffer");