qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Fam Zheng <famz@redhat.com>,
	hbrock@redhat.com, qemu-devel@nongnu.org, rjones@redhat.com,
	imain@redhat.com, stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2 10/11] block: add option 'backing' to -drive options
Date: Wed, 17 Jul 2013 14:58:10 +0200	[thread overview]
Message-ID: <20130717125810.GI2458@dhcp-200-207.str.redhat.com> (raw)
In-Reply-To: <51E68FBC.10200@redhat.com>

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, but I think this is really the
right thing to do, and it's the general direction we're headed for with
blockdev-add. The user manages his BlockDriverStates and connects them
as he sees fit. The defaults of qemu are only used when the user doesn't
override them (and libvirt is going to override most to use fd passing).

My expectation is, admittedly, that it's hard to get right from where we
stand today, because of the coupling of BlockDriverStates with guest
devices, but with the refcounting patches (which I haven't reviewed
yet), maybe one of the biggest concerns is addressed.

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.

Kevin

  reply	other threads:[~2013-07-17 12:58 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-17  9:42 [Qemu-devel] [PATCH v2 00/11] Point-in-time snapshot exporting over NBD Fam Zheng
2013-07-17  9:42 ` [Qemu-devel] [PATCH v2 01/11] block: replace in_use with refcnt_soft and refcnt_hard Fam Zheng
2013-07-17 12:26   ` Paolo Bonzini
2013-07-18  4:53     ` Fam Zheng
2013-07-23  9:36   ` Stefan Hajnoczi
2013-07-23 10:32     ` Fam Zheng
2013-07-23 13:34       ` Stefan Hajnoczi
2013-07-24  0:39         ` Fam Zheng
2013-07-24  7:35           ` Stefan Hajnoczi
2013-07-24  7:44             ` Fam Zheng
2013-07-25  7:52               ` Stefan Hajnoczi
2013-07-17  9:42 ` [Qemu-devel] [PATCH v2 02/11] block: use refcnt for bs->backing_hd and bs->file Fam Zheng
2013-07-17  9:42 ` [Qemu-devel] [PATCH v2 03/11] block: use refcnt for drive_init/drive_uninit Fam Zheng
2013-07-17  9:42 ` [Qemu-devel] [PATCH v2 04/11] block: use refcnt for device attach/detach Fam Zheng
2013-07-23  9:44   ` Stefan Hajnoczi
2013-07-17  9:42 ` [Qemu-devel] [PATCH v2 05/11] migration: omit drive ref as we have bdrv_ref now Fam Zheng
2013-07-23  9:49   ` Stefan Hajnoczi
2013-07-17  9:42 ` [Qemu-devel] [PATCH v2 06/11] xen_disk: simplify blk_disconnect with refcnt Fam Zheng
2013-07-23  9:50   ` Stefan Hajnoczi
2013-07-17  9:42 ` [Qemu-devel] [PATCH v2 07/11] block: hold hard reference for backup/mirror target Fam Zheng
2013-07-23  9:52   ` Stefan Hajnoczi
2013-07-25  6:08     ` Fam Zheng
2013-07-25  7:59       ` Stefan Hajnoczi
2013-07-17  9:42 ` [Qemu-devel] [PATCH v2 08/11] block: simplify bdrv_drop_intermediate Fam Zheng
2013-07-24 23:16   ` Jeff Cody
2013-07-25  1:34     ` Fam Zheng
2013-07-17  9:42 ` [Qemu-devel] [PATCH v2 09/11] block: add assertion to check refcount before deleting Fam Zheng
2013-07-17  9:42 ` [Qemu-devel] [PATCH v2 10/11] block: add option 'backing' to -drive options Fam Zheng
2013-07-17 12:36   ` Paolo Bonzini
2013-07-17 12:58     ` Kevin Wolf [this message]
2013-07-17 13:13       ` Paolo Bonzini
2013-07-17 13:48         ` Kevin Wolf
2013-07-17 14:16           ` Paolo Bonzini
2013-07-17 15:09             ` Kevin Wolf
2013-07-17 15:23               ` Paolo Bonzini
2013-07-23 20:07               ` Ian Main
2013-07-22  6:07     ` Fam Zheng
2013-07-23 19:57       ` Ian Main
2013-07-17  9:42 ` [Qemu-devel] [PATCH v2 11/11] qmp: add command 'blockdev-backup' Fam Zheng
2013-07-17 12:44   ` Eric Blake
2013-07-18  4:41     ` Fam Zheng
2013-07-19 10:16       ` Wenchao Xia
2013-07-23 10:10         ` Stefan Hajnoczi
2013-07-19 10:41 ` [Qemu-devel] [PATCH v2 00/11] Point-in-time snapshot exporting over NBD Wenchao Xia
2013-07-23  1:52   ` Wenchao Xia
2013-07-23  6:35     ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130717125810.GI2458@dhcp-200-207.str.redhat.com \
    --to=kwolf@redhat.com \
    --cc=famz@redhat.com \
    --cc=hbrock@redhat.com \
    --cc=imain@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rjones@redhat.com \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).