[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH 1/3] blockdev-backup: Don't move target AioConte
From: |
Fam Zheng |
Subject: |
Re: [Qemu-block] [PATCH 1/3] blockdev-backup: Don't move target AioContext if it's attached |
Date: |
Mon, 23 May 2016 09:00:40 +0800 |
User-agent: |
Mutt/1.6.1 (2016-04-27) |
On Fri, 05/20 10:03, Kevin Wolf wrote:
> Am 18.05.2016 um 10:24 hat Fam Zheng geschrieben:
> > If the BDS is attached, it will want to stay on the AioContext where its
> > BlockBackend is. Don't call bdrv_set_aio_context in this case.
> >
> > Signed-off-by: Fam Zheng <address@hidden>
> > ---
> > blockdev.c | 12 +++++++++++-
> > 1 file changed, 11 insertions(+), 1 deletion(-)
> >
> > diff --git a/blockdev.c b/blockdev.c
> > index 1892b8e..eb15593 100644
> > --- a/blockdev.c
> > +++ b/blockdev.c
> > @@ -3376,8 +3376,18 @@ void do_blockdev_backup(const char *device, const
> > char *target,
> > }
> > target_bs = blk_bs(target_blk);
> >
> > + if (bdrv_get_aio_context(target_bs) != aio_context) {
> > + if (!target_bs->blk) {
>
> How should this ever happen when we have target_bs = blk_bs(target_blk)
> two lines above?
I must have made a mistake with git or my editor, I meant to change it to
bdrv_lookup_bs above.
Fam
>
> > + /* The target BDS is not attached, we can safely move it to
> > another
> > + * AioContext. */
> > + bdrv_set_aio_context(target_bs, aio_context);
> > + } else {
> > + error_setg(errp, "Target is attached to a different thread
> > from "
> > + "source.");
> > + goto out;
> > + }
> > + }
>
> Kevin
- [Qemu-block] [PATCH 0/3] Drop virtio-{blk,scsi} op blockers, Fam Zheng, 2016/05/18
- [Qemu-block] [PATCH 1/3] blockdev-backup: Don't move target AioContext if it's attached, Fam Zheng, 2016/05/18
- [Qemu-block] [PATCH 2/3] virtio-blk: Remove op blocker for dataplane, Fam Zheng, 2016/05/18
- [Qemu-block] [PATCH 3/3] virtio-scsi: Remove op blocker for dataplane, Fam Zheng, 2016/05/18
- Re: [Qemu-block] [PATCH 0/3] Drop virtio-{blk,scsi} op blockers, Michael S. Tsirkin, 2016/05/18
- Re: [Qemu-block] [PATCH 0/3] Drop virtio-{blk,scsi} op blockers, Stefan Hajnoczi, 2016/05/19
- Re: [Qemu-block] [PATCH 0/3] Drop virtio-{blk,scsi} op blockers, Stefan Hajnoczi, 2016/05/19