From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 26 22:20:34 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A8F531065670; Tue, 26 Jul 2011 22:20:34 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 46B8B8FC0C; Tue, 26 Jul 2011 22:20:33 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id p6QMKRvO070558 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 27 Jul 2011 01:20:27 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id p6QMKRUI094612; Wed, 27 Jul 2011 01:20:27 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id p6QMKRa9094611; Wed, 27 Jul 2011 01:20:27 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 27 Jul 2011 01:20:27 +0300 From: Kostik Belousov To: Juergen Lock Message-ID: <20110726222027.GQ17489@deviant.kiev.zoral.com.ua> References: <1311574719.49706.YahooMailClassic@web122313.mail.ne1.yahoo.com> <4E2D1275.8000305@yandex.ru> <20110726180335.GA82849@triton8.kn-bremen.de> <20110726212234.GP17489@deviant.kiev.zoral.com.ua> <20110726213544.GA91944@triton8.kn-bremen.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="tTJutuQz30oL/uz7" Content-Disposition: inline In-Reply-To: <20110726213544.GA91944@triton8.kn-bremen.de> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: freebsd-hackers@freebsd.org, freebsd-emulation@freebsd.org Subject: Re: wdrain vs. fuse/ggate (was: Re: mount vdi) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jul 2011 22:20:34 -0000 --tTJutuQz30oL/uz7 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 26, 2011 at 11:35:44PM +0200, Juergen Lock wrote: > On Wed, Jul 27, 2011 at 12:22:34AM +0300, Kostik Belousov wrote: > > On Tue, Jul 26, 2011 at 08:03:35PM +0200, Juergen Lock wrote: > > > On Mon, Jul 25, 2011 at 06:31:36PM -0500, Brandon Gooch wrote: > > > > 2011/7/25 Andrey V. Elsukov : > > > > > On 25.07.2011 10:18, Joe Sciulli wrote: > > > > >> Is it possible to mount virtualbox vdi file on the FreeBSD host?= =9AThis appears to be doable on > > > > >> windows and linux hosts, which basically is done in two steps: 1= . find offset in the image. 2. > > > > >> mount the image with that offset. > > > > >> > > > > >> I'm trying to do the same thing on FreeBSD, and found the undocu= mented and deprecated command > > > > >> still works: > > > > >> > > > > >> VBoxManage internalcommands dumphdinfo freebsd_home.vdi > > > > >> > > > > >> I got the following for the virtual disk image holding the /home= (no root hence no MBR) disk for > > > > >> a FreeBSD guest: > > > > >> > > > > >> Header: offBlocks=3D4096 offData=3D28672 > > > > >> > > > > >> Then attempt to mount it: > > > > >> > > > > >> mdconfig -a -t vnode -f /tmp/freebsd_home_56.vdi -u 0 mount /dev= /md0 /tmp/aaa/ mount -t cd9660 > > > > >> /dev/md0 /tmp/aaa/ > > > > >> > > > > >> unfortunately both the above two mount commands failed with "Inv= alid argument". =9AI tried > > > > >> skip=3D28672 to no avail as well. =9AAnything did I do wrong? > > > > > > > > > > I have not any Vbox images with fixed size, but i tried this: > > > > > # mdconfig -f 10G_GPT_UFS.vdi > > > > > # gnop create -v -o 41472 /dev/md0 > > > > > > > > > > where 41472 is offData value. After that md0.nop was tasted and r= eports about invalid GPT. > > > > > So, i think if your image is fixed size disk yout can try this me= thod and mount UFS (not cd9660). > > > > > > > > > > -- > > > > > WBR, Andrey V. Elsukov > > > >=20 > > > > There was a CFT sent out a while back about a fuse module for mount= ing > > > > vdi images: > > > >=20 > > > > http://lists.freebsd.org/pipermail/freebsd-emulation/2010-September= /007964.html > > > >=20 > > > > Not sure about the state of this now though... > > >=20 > > > Yeah sorry I never got back to this after getting reports that > > > writes are stuck in wdrain... [1] I guess what happens is the > > > vdfuse process wants to write many(?) more blocks than the number > > > that got queued by the original fuse request and/or too many writes > > > get queued up at once before the vdfuse process gets to handle them > > > (trying to increase runningbufspace even more), and thus there is > > > deadlock. :( So my question for -hackers is, does anyone have a > > > clever idea how to fix this? Should the fuse requests for this be > > > exempted from the wdrain bookkeeping so that only the actual writes > > > by the vdfuse process get counted, and if yes, how would I best > > > accomplish this? > > >=20 > > > Thanx! :) > > > Juergen > >=20 > > Excluding any buffers from runningbufspace is absolutely wrong. > > You will get another deadlock due to excessive pressure on the buffer > > space. >=20 > Alright, so how to fix the deadlocks then? :) In general, you cannot, without rearchitecturing the buffer deadlock avoidance code. md(4) is in similar situation, but there the i/o does not leave kernel. You can look for VV_MD and similar hacks spreaded in sys/. --tTJutuQz30oL/uz7 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAk4vPaoACgkQC3+MBN1Mb4gBUQCfTKTfOF1Tz8bn6WKZlvPSDlif /tgAnisKwFzEGgNnD6Q1w8ndavuC/NYI =GXuv -----END PGP SIGNATURE----- --tTJutuQz30oL/uz7--