All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel <qemu-devel@nongnu.org>, Chunyan Liu <cyliu@suse.com>
Subject: Re: [Qemu-devel] [PATCH V2] Add -f option to qemu-nbd
Date: Fri, 18 Nov 2011 09:59:12 +0100	[thread overview]
Message-ID: <4EC61E60.2040405@redhat.com> (raw)
In-Reply-To: <4EC64EC90200006600006BCD@novprvlin0050.provo.novell.com>

On 11/18/2011 02:25 AM, Chun Yan Liu wrote:
> Yes. I have tested using same device twice as described in my previous
> mail. Without lock:
>
> If issuing "qemu-nbd -c /dev/nbd0 disk.img" and "qemu-nbd -c  /dev/nbd0
> disk1.img" almost at the same time, both can pass nbd_init() and get to
> nbd_client(), then the latter one will fail and exit, but the first one
> does not work well either (fail to show partitions.) That's why I think
> we should add a lock in an earlier time.

This is an initialization problem.  As Stefan wrote, functionality for 
atomic acquisition of NBD devices is provided by the kernel; the problem 
is simply that QEMU does not use it. :)

Paolo

  reply	other threads:[~2011-11-18  8:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-17 11:36 [Qemu-devel] [PATCH V2] Add -f option to qemu-nbd Chunyan Liu
2011-11-17 13:41 ` Paolo Bonzini
2011-11-17 13:52   ` Stefan Hajnoczi
2011-11-18  1:25   ` Chun Yan Liu
2011-11-18  8:59     ` Paolo Bonzini [this message]
2011-11-23  6:51       ` Chun Yan Liu
2011-11-23  7:24         ` 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=4EC61E60.2040405@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=cyliu@suse.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.