]> git.proxmox.com Git - mirror_qemu.git/commit - block/file-posix.c
block: make discard asynchronous
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 14 Jan 2013 15:26:55 +0000 (16:26 +0100)
committerStefan Hajnoczi <stefanha@redhat.com>
Tue, 15 Jan 2013 09:03:47 +0000 (10:03 +0100)
commit8238010b265886249f9f3d45e890788319b7736e
treeb526fdc8a5ec57a5986d2cd64bf0f4217a9f3391
parentfcd9d4555252c47a337357dfce0806e5dde99d96
block: make discard asynchronous

This is easy with the thread pool, because we can use s->is_xfs and
s->has_discard from the worker function.

QEMU has a widespread assumption that each I/O operation writes less
than 2^32 bytes.  This patch doesn't fix it throughout of course,
but it starts correcting struct RawPosixAIOData so that there is
no regression with respect to the synchronous discard implementation.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
block/raw-aio.h
block/raw-posix.c