qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [patch 2/5] qemu-nbd: merge NBD client/server


From: Thiemo Seufer
Subject: Re: [Qemu-devel] [patch 2/5] qemu-nbd: merge NBD client/server
Date: Thu, 3 Jul 2008 11:27:11 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

Laurent Vivier wrote:
> Le jeudi 03 juillet 2008 à 09:21 +0200, Kevin Wolf a écrit :
> > Thiemo Seufer schrieb:
> > > address@hidden 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]