[Top][All Lists]

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

[Qemu-devel] Re: NBD server for QEMU images

From: Anthony Liguori
Subject: [Qemu-devel] Re: NBD server for QEMU images
Date: Tue, 12 Dec 2006 14:13:21 -0600
User-agent: Thunderbird (X11/20061115)

Salvador Fandino wrote:
Anthony Liguori wrote:
Salvador FandiƱo wrote:

The patch available from http://qemu-forum.ipi.fi/viewtopic.php?t=2718
adds a new utility, qemu-nbds, that implements a NBD server (see
http://nbd.sf.net) for QEMU images.

Using this utility it is posible to mount images in any format
supported by QEMU.

Unfortunatelly, only read access works (locally) due to a limitation
on the Linux Kernel :-(

And write access works for me.  What's this limitation you speak of?

Mounting a partition being served on the same host as read-write can
cause deadlocks. From nbd-2.9.0 README file:

This text is pretty old. Is this still valid? This would imply that things like loop can result in dead locks. I don't see why flushing one device would depend on the completion of another device. Otherwise, if you had two disk adapters, they would always be operating in lock step.

As I've said, I've never seen a problem doing-write with nbd on localhost.


Anthony Liguori

"When you write something to a block device, the kernel will not
immediately write that to the physical block device; instead, your
changes are written to a cache, which is periodically flushed by a
kernel thread, 'kblockd'. If you're using a single-processor system,
then you'll have only one kblockd, meaning, the kernel can't write to
more than one block device at the same time.

If, while your kblockd is emptying the NBD buffer cache, the kernel
decides that the cache of the block device your nbd-server is writing to
needs to be emptied, then you've got a deadlock."


 - Salva

reply via email to

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