[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 10/11] block: add option 'backing' to -drive
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [PATCH v2 10/11] block: add option 'backing' to -drive options |
Date: |
Wed, 17 Jul 2013 15:48:49 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Am 17.07.2013 um 15:13 hat Paolo Bonzini geschrieben:
> Il 17/07/2013 14:58, Kevin Wolf ha scritto:
> > Am 17.07.2013 um 14:36 hat Paolo Bonzini geschrieben:
> >> Il 17/07/2013 11:42, Fam Zheng ha scritto:
> >>> This option allows overriding backing hd of drive. If the target drive
> >>> exists, it's referenced as the backing file and refcount incremented.
> >>>
> >>> Example:
> >>> qemu-system-x86_64 -drive \
> >>> file.filename=foo.qcow2,if=none,id=foo \
> >>> -drive file=bar.qcow2,backing=foo
> >>
> >> I guess this is where we need the soft reference.
> >>
> >> This has a _lot_ of potential for misuse, I think Kevin bashed me and
> >> Federico very heavily when we tried to do something similar.
> >
> > Not sure what exactly I "bashed" you for
>
> Doing strange things with bs->backing_hd (blkmirror comes to mind).
>
> > This is basically restarting the discussion where I suggested to give
> > the targets of a block job names so that they can be reused. It's about
> > the same kind of misuse that becomes possible and that we need to
> > protect against.
>
> Yes. But then I'm not sure why we need to rush in blockdev-backup now.
> Instead we can simply make drive-backup optionally give a name to the
> target.
>
> I understand this is the right thing to do long term, but pre-opening of
> the target is not really needed for fleecing.
So for how much longer should we plan to procrastinate? (I know, not an
entirely fair question, but we have to make the step at some point)
I guess we can give a name to the target, and we can make drive-backup
automatically connect the target with the original as its backing file
(still needs the refcounting, by the way). But is giving a name to the
target not enough to allow "interesting" things to be done? I don't
remember the details from the mirroring discussion, but it seems it were
enough that you didn't want to do it.
And we'll want to reference existing BDSes as backing/protocol files in
blockdev-add soon anyway, so if we decide against it here, it's just
moving from Fam's to-do list to mine...
So no, I'm not totally comfortable with allowing it, but not allowing it
isn't really an option either.
Kevin
- [Qemu-devel] [PATCH v2 06/11] xen_disk: simplify blk_disconnect with refcnt, (continued)
- [Qemu-devel] [PATCH v2 06/11] xen_disk: simplify blk_disconnect with refcnt, Fam Zheng, 2013/07/17
- [Qemu-devel] [PATCH v2 07/11] block: hold hard reference for backup/mirror target, Fam Zheng, 2013/07/17
- [Qemu-devel] [PATCH v2 08/11] block: simplify bdrv_drop_intermediate, Fam Zheng, 2013/07/17
- [Qemu-devel] [PATCH v2 09/11] block: add assertion to check refcount before deleting, Fam Zheng, 2013/07/17
- [Qemu-devel] [PATCH v2 10/11] block: add option 'backing' to -drive options, Fam Zheng, 2013/07/17
- Re: [Qemu-devel] [PATCH v2 10/11] block: add option 'backing' to -drive options, Paolo Bonzini, 2013/07/17
- Re: [Qemu-devel] [PATCH v2 10/11] block: add option 'backing' to -drive options, Kevin Wolf, 2013/07/17
- Re: [Qemu-devel] [PATCH v2 10/11] block: add option 'backing' to -drive options, Paolo Bonzini, 2013/07/17
- Re: [Qemu-devel] [PATCH v2 10/11] block: add option 'backing' to -drive options,
Kevin Wolf <=
- Re: [Qemu-devel] [PATCH v2 10/11] block: add option 'backing' to -drive options, Paolo Bonzini, 2013/07/17
- Re: [Qemu-devel] [PATCH v2 10/11] block: add option 'backing' to -drive options, Kevin Wolf, 2013/07/17
- Re: [Qemu-devel] [PATCH v2 10/11] block: add option 'backing' to -drive options, Paolo Bonzini, 2013/07/17
- Re: [Qemu-devel] [PATCH v2 10/11] block: add option 'backing' to -drive options, Ian Main, 2013/07/23
- Re: [Qemu-devel] [PATCH v2 10/11] block: add option 'backing' to -drive options, Fam Zheng, 2013/07/22
- Re: [Qemu-devel] [PATCH v2 10/11] block: add option 'backing' to -drive options, Ian Main, 2013/07/23
[Qemu-devel] [PATCH v2 11/11] qmp: add command 'blockdev-backup', Fam Zheng, 2013/07/17