[Devel] [PATCH RH9 v4 01/10] drivers/vhost: vhost-blk accelerator for virtio-blk guests
Pavel Tikhomirov
ptikhomirov at virtuozzo.com
Fri Nov 4 14:22:21 MSK 2022
On 01.11.2022 10:25, Andrey Zhadchenko wrote:
> +/* It is forbidden to call more than one vhost_blk_flush() simultaneously */
Let's add at least a warning for this case:
> +static void vhost_blk_flush(struct vhost_blk *blk)
> +{
> + int flush_bin;
> +
> + spin_lock(&blk->flush_lock);
WARN_ON(blk->during_flush);
> + blk->during_flush = 1;
Because in the case of two flushes, first flush can hang infinitely
waiting for its flush_bin to get empty.
--
Best regards, Tikhomirov Pavel
Software Developer, Virtuozzo.
More information about the Devel
mailing list