[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [Qemu-block] [PATCH 1/2] block: Convert .bdrv_truncate
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [Qemu-block] [PATCH 1/2] block: Convert .bdrv_truncate callback to coroutine_fn |
Date: |
Mon, 25 Jun 2018 10:02:13 +0100 |
User-agent: |
Mutt/1.10.0 (2018-05-17) |
On Thu, Jun 21, 2018 at 07:06:56PM +0200, Kevin Wolf wrote:
> bdrv_truncate() is an operation that can block (even for a quite long
> time, depending on the PreallocMode) in I/O paths that shouldn't block.
> Convert it to a coroutine_fn so that we have the infrastructure for
> drivers to make their .bdrv_co_truncate implementation asynchronous.
block/commit.c:commit_run() invokes blk_truncate() outside of a drained
region. I haven't looked for other instances, but this patch opens the
door for races with other I/O requests. Are you sure it's safe to make
this asynchronous without request serialization?
Stefan
signature.asc
Description: PGP signature