From: Thiemo Seufer <ths@networkno.de>
To: Laurent Vivier <Laurent.Vivier@bull.net>
Cc: Kevin Wolf <kwolf@suse.de>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [patch 2/5] qemu-nbd: merge NBD client/server
Date: Thu, 3 Jul 2008 11:27:11 +0100 [thread overview]
Message-ID: <20080703102711.GH7007@networkno.de> (raw)
In-Reply-To: <1215072813.3804.2.camel@frecb07144>
Laurent Vivier wrote:
> Le jeudi 03 juillet 2008 à 09:21 +0200, Kevin Wolf a écrit :
> > Thiemo Seufer schrieb:
> > > Laurent.Vivier@bull.net wrote:
> > >> This patch allows to connect directly a disk image file to an NBD
> > >> device. It introduces the use of a unix socket (instead of inet).
> > >>
> > >> - To connect a file to a device:
> > >>
> > >> # qemu-nbd --connect=/dev/nbd0 my_disk.qcow2
> > >>
> > >> Then you can see directly your disk (no need of nbd-client):
> > >>
> > >> # fdisk -l /dev/nbd0
> > >>
> > >> Disk /dev/nbd0: 4294 MB, 4294967296 bytes
> > >> 255 heads, 63 sectors/track, 522 cylinders
> > >> Units = cylinders of 16065 * 512 = 8225280 bytes
> > >>
> > >> Device Boot Start End Blocks Id System
> > >> /dev/nbd0p1 * 1 492 3951958+ 83 Linux
> > >> /dev/nbd0p2 493 522 240975 5 Extended
> > >> /dev/nbd0p5 493 522 240943+ 82 Linux swap /
> > >> Solaris
> > >>
> > >> - To disconnect the file from the device:
> > >>
> > >> # qemu-nbd --disconnect /dev/nbd0
> > >>
> > >> Changelog:
> > >> - v2: call show_parts() from client and avoid the sleep(1). Thank you to
> > >> Avi and Anthony. Include my cleanup patch and comments from Carlo
> > >> Marcelo Arenas Belon.
> > >> - v3: allow to specify unix socket name with "--socket" and update
> > >> documentation.
> > >
> > > There's still a call to sleep() in this patch.
> >
> > And that's fine, IMHO. sleep() is not bad per se. The remaining call is
> > not a "guess it'll take at most a second" style sleep but waiting in a
> > loop until the child is ready. You don't want the loop to eat up 100%
> > CPU, do you?
>
> I agree.
I committed it with a small change (exit is not the best name for a label).
Thiemo
next prev parent reply other threads:[~2008-07-03 10:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-27 11:02 [Qemu-devel] [patch 0/5] NBD support improvement Laurent.Vivier
2008-06-27 11:02 ` [Qemu-devel] [patch 1/5] qemu-nbd: cleanup Laurent.Vivier
2008-06-27 11:02 ` [Qemu-devel] [patch 2/5] qemu-nbd: merge NBD client/server Laurent.Vivier
2008-07-02 21:26 ` Thiemo Seufer
2008-07-03 7:21 ` Kevin Wolf
2008-07-03 8:13 ` Laurent Vivier
2008-07-03 10:27 ` Thiemo Seufer [this message]
2008-06-27 11:02 ` [Qemu-devel] [patch 3/5] qemu-nbd: add a parameter to disable host cache Laurent.Vivier
2008-06-27 11:02 ` [Qemu-devel] [patch 4/5] qemu-nbd: allow to share a disk image Laurent.Vivier
2008-06-27 11:02 ` [Qemu-devel] [patch 5/5] Allow QEMU to connect directly to an NBD server Laurent.Vivier
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=20080703102711.GH7007@networkno.de \
--to=ths@networkno.de \
--cc=Laurent.Vivier@bull.net \
--cc=kwolf@suse.de \
--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).