Il 30/08/2013 09:59, Cornelia Huck ha scritto:
> +    vr->used_idx = vr->used->idx;
> +    /*
> +     * Wait until the used index has moved.
> +     * Note: This is only race-free if the host doesn't start draining
> +     * the queue out of its own accord.
> +     */
> +    while (vr->used->idx == vr->used_idx) {

Can you instead initialize vr->used_idx in virtio_setup_block, and then
update it _after_ the while loop?  This would be race-free.

Paolo

Reply via email to