From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GuBPU-0007nr-CV for qemu-devel@nongnu.org; Tue, 12 Dec 2006 12:27:20 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GuBPS-0007kf-MK for qemu-devel@nongnu.org; Tue, 12 Dec 2006 12:27:19 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GuBPS-0007kW-H1 for qemu-devel@nongnu.org; Tue, 12 Dec 2006 12:27:18 -0500 Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GuBPS-0004Yw-46 for qemu-devel@nongnu.org; Tue, 12 Dec 2006 12:27:18 -0500 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1GuBPJ-0000Rj-2W for qemu-devel@nongnu.org; Tue, 12 Dec 2006 18:27:09 +0100 Received: from 62.87.55.189 ([62.87.55.189]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 12 Dec 2006 18:27:09 +0100 Received: from sfandino by 62.87.55.189 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 12 Dec 2006 18:27:09 +0100 From: Salvador Fandino Date: Tue, 12 Dec 2006 18:32:17 +0100 Message-ID: References: <20061212124803.47702.qmail@web52708.mail.yahoo.com> <457EC621.6000701@codemonkey.ws> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit In-Reply-To: <457EC621.6000701@codemonkey.ws> Sender: news Subject: [Qemu-devel] Re: NBD server for QEMU images Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Anthony Liguori wrote: > Salvador Fandiņo wrote: >> Hi, >> >> 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 :-( > > http://hg.codemonkey.ws/qemu-nbd/ > > 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: "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." Regards, - Salva