From: Stefan Hajnoczi <stefanha@redhat.com>
To: Asias He <asias@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
qemu-devel@nongnu.org, kvm@vger.kernel.org
Subject: Re: [Qemu-devel] [PATCH] virtio-blk: Set default serial id
Date: Wed, 20 Mar 2013 08:52:57 +0100 [thread overview]
Message-ID: <20130320075257.GA5913@stefanha-thinkpad.muc.redhat.com> (raw)
In-Reply-To: <1363758968-28549-1-git-send-email-asias@redhat.com>
On Wed, Mar 20, 2013 at 01:56:08PM +0800, Asias He wrote:
> If user does not specify a serial id, e.g.
>
> -device virtio-blk-pci,serial="serial_id"
> or
> -drive serial="serial_id"
>
> no serial id will be assigned.
>
> Add a default serial id in this case to help identifying
> the disk in guest.
>
> Signed-off-by: Asias He <asias@redhat.com>
> ---
> hw/virtio-blk.c | 7 +++++++
> 1 file changed, 7 insertions(+)
Autogenerated IDs have been proposed (for other devices?) before and I
think we should avoid them.
The serial in this patch depends on the internal counter we use for
savevm. It is not a well-defined value that guests can depend on
remaining the same.
It can change between QEMU invocations - due to internal changes in QEMU
or because the management tool reordered -device options.
Users will be confused and their guests may stop working if they depend
on an ID like this.
The solution is to do persistent naming either by really passing -device
virtio-blk-pci,serial= or with udev inside the guest using the bus
address (PCI devfn) like the new persistent network interface naming for
Linux.
Stefan
next prev parent reply other threads:[~2013-03-20 7:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-20 5:56 [Qemu-devel] [PATCH] virtio-blk: Set default serial id Asias He
2013-03-20 7:52 ` Stefan Hajnoczi [this message]
2013-03-20 8:34 ` Asias He
2013-03-21 9:31 ` 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=20130320075257.GA5913@stefanha-thinkpad.muc.redhat.com \
--to=stefanha@redhat.com \
--cc=asias@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/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).