[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/2] virtio-blk: use aio handler for data plane
From: |
Michael S. Tsirkin |
Subject: |
Re: [Qemu-devel] [PATCH 2/2] virtio-blk: use aio handler for data plane |
Date: |
Tue, 29 Mar 2016 17:09:32 +0300 |
On Tue, Mar 29, 2016 at 04:05:46PM +0200, Paolo Bonzini wrote:
>
>
> On 29/03/2016 15:42, Michael S. Tsirkin wrote:
> > + if (s->dataplane) {
> > + /* Some guests kick before setting VIRTIO_CONFIG_S_DRIVER_OK so
> > start
> > + * dataplane here instead of waiting for .set_status().
> > + */
> > + if (!s->dataplane_started) {
> > + virtio_blk_data_plane_start(s->dataplane);
> > + }
> > + return;
> > + }
> > +
> > + virtio_blk_handle_vq(s, vq);
>
> Another small comment, this can be written simply as
>
> if (s->dataplane) {
> virtio_blk_data_plane_start(s->dataplane);
True, it's best not to poke at dataplane_started.
> } else {
> virtio_blk_handle_vq(s, vq);
> }
>
I prefer the return style I think, to stress the
fact that this is an unusual, unexpected case.
> Paolo
Re: [Qemu-devel] [PATCH 0/2] dataplane: fix start/stop races, Michael S. Tsirkin, 2016/03/29
Re: [Qemu-devel] [PATCH 0/2] dataplane: fix start/stop races, Cornelia Huck, 2016/03/29
Re: [Qemu-devel] [PATCH 0/2] dataplane: fix start/stop races, Christian Borntraeger, 2016/03/29