From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GuE0p-0006ah-P7 for qemu-devel@nongnu.org; Tue, 12 Dec 2006 15:14:03 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GuE0o-0006aN-9s for qemu-devel@nongnu.org; Tue, 12 Dec 2006 15:14:03 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GuE0o-0006aI-5f for qemu-devel@nongnu.org; Tue, 12 Dec 2006 15:14:02 -0500 Received: from [32.97.182.145] (helo=e5.ny.us.ibm.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GuE0o-0002jz-3T for qemu-devel@nongnu.org; Tue, 12 Dec 2006 15:14:02 -0500 Received: from d01relay02.pok.ibm.com (d01relay02.pok.ibm.com [9.56.227.234]) by e5.ny.us.ibm.com (8.13.8/8.12.11) with ESMTP id kBCKE0dx010972 for ; Tue, 12 Dec 2006 15:14:00 -0500 Received: from d01av01.pok.ibm.com (d01av01.pok.ibm.com [9.56.224.215]) by d01relay02.pok.ibm.com (8.13.6/8.13.6/NCO v8.1.1) with ESMTP id kBCKDWGO288938 for ; Tue, 12 Dec 2006 15:13:35 -0500 Received: from d01av01.pok.ibm.com (loopback [127.0.0.1]) by d01av01.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id kBCKDV3U014256 for ; Tue, 12 Dec 2006 15:13:31 -0500 Received: from [9.53.41.158] (dyn95341158.austin.ibm.com [9.53.41.158]) by d01av01.pok.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id kBCKDUsU014167 for ; Tue, 12 Dec 2006 15:13:31 -0500 Message-ID: <457F0D61.90008@codemonkey.ws> Date: Tue, 12 Dec 2006 14:13:21 -0600 From: Anthony Liguori MIME-Version: 1.0 References: <20061212124803.47702.qmail@web52708.mail.yahoo.com> <457EC621.6000701@codemonkey.ws> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable 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 Salvador Fandino wrote: > Anthony Liguori wrote: >> Salvador Fandi=F1o wrote: >>> Hi, >>> >>> The patch available from http://qemu-forum.ipi.fi/viewtopic.php?t=3D2= 718 >>> 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? >=20 > 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=20 things like loop can result in dead locks. I don't see why flushing one=20 device would depend on the completion of another device. Otherwise, if=20 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. Regards, 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. >=20 > 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 t= o > needs to be emptied, then you've got a deadlock." >=20 > Regards, >=20 > - Salva