[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PULL 1/1] virtio-blk: don't start dataplane during the stop of data
From: |
Stefan Hajnoczi |
Subject: |
Re: [PULL 1/1] virtio-blk: don't start dataplane during the stop of dataplane |
Date: |
Tue, 17 Oct 2023 09:46:53 -0400 |
On Tue, Oct 17, 2023 at 12:02:26PM +0200, Kevin Wolf wrote:
> Am 17.10.2023 um 11:01 hat Fiona Ebner geschrieben:
> > Am 16.10.23 um 21:40 schrieb Stefan Hajnoczi:
> > > diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
> > > index 39e7f23fab..c2d59389cb 100644
> > > --- a/hw/block/virtio-blk.c
> > > +++ b/hw/block/virtio-blk.c
> > > @@ -1166,7 +1166,7 @@ static void virtio_blk_handle_output(VirtIODevice
> > > *vdev, VirtQueue *vq)
> > > {
> > > VirtIOBlock *s = (VirtIOBlock *)vdev;
> > >
> > > - if (s->dataplane && !s->dataplane_started) {
> > > + if (s->dataplane && !s->dataplane_started && !s->stopping) {
> >
> > Isn't 'stopping' a property of VirtIOBlockDataPlane? Here, s is VirtIOBlock.
>
> Indeed, this patch doesn't even build for me.
>
> However, even if we wrote !s->dataplane->stopping, would it really be
> right to be handling I/O in the main thread while the dataplane hasn't
> stopped yet? At least without all the multiqueue changes, it's not
> obvious to me that it can't cause problems. Unfortunately, the commit
> message doesn't say anything about why it's safe.
Thanks for pointing these things out, Fiona and Kevin. I've dropped the
patch for now.
Stefan
signature.asc
Description: PGP signature