From owner-freebsd-current@FreeBSD.ORG Sat Feb 3 13:18:43 2007 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 67F9F16A501; Sat, 3 Feb 2007 13:18:43 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (arm132.internetdsl.tpnet.pl [83.17.198.132]) by mx1.freebsd.org (Postfix) with ESMTP id 55D0C13C4A3; Sat, 3 Feb 2007 13:18:42 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id AD5C648806; Sat, 3 Feb 2007 14:18:39 +0100 (CET) Received: from localhost (154.81.datacomsa.pl [195.34.81.154]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 3BD5048802; Sat, 3 Feb 2007 14:18:33 +0100 (CET) Date: Sat, 3 Feb 2007 14:17:43 +0100 From: Pawel Jakub Dawidek To: Ivan Voras Message-ID: <20070203131743.GC64874@garage.freebsd.pl> References: <45C336D7.2060109@fer.hr> <20070202133055.GB21290@garage.freebsd.pl> <200702031238.52771.pieter@degoeje.nl> <45C48175.5060704@fer.hr> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="rQ2U398070+RC21q" Content-Disposition: inline In-Reply-To: <45C48175.5060704@fer.hr> X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 7.0-CURRENT i386 User-Agent: mutt-ng/devel-r804 (FreeBSD) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-2.6 required=3.0 tests=BAYES_00 autolearn=ham version=3.0.4 Cc: Pieter de Goeje , freebsd-current@freebsd.org, freebsd-geom@freebsd.org Subject: Re: First steps towards importing gvirstor into -current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Feb 2007 13:18:43 -0000 --rQ2U398070+RC21q Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Feb 03, 2007 at 01:35:01PM +0100, Ivan Voras wrote: > Pieter de Goeje wrote: >=20 > > GEOM_VIRSTOR[1]: All physical space allocated for test > > GEOM_VIRSTOR[5]: Failed to allocate physical chunk for virstor/test > > g_vfs_done():virstor/test[WRITE(offset=3D103153664, length=3D131072)]er= ror =3D 28 >=20 > > It spitted out these messages in a tight loop (100% sys load). I was un= able to=20 >=20 > Yes, it turns out the file system gets confused if the device reports a > certain size and then returns ENOSPC (error 28) when it shouldn't. > Unfortunately, yanking the device from under the file system would panic > the kernel. Returning EIO could either panic it or "just" end up with a > corrupted file system. Any ideas from the more VFS-savvy? >=20 > The "tight loop" seems to be VFS retrying, inserting the requests to > GEOM layer over and over... I don't think so. ENOSPC should be just returned to the application. What was pasted seems to confirm my thinking: g_vfs_done():virstor/test[WRITE(offset=3D101842944, length=3D131072)]error = =3D 28 g_vfs_done():virstor/test[WRITE(offset=3D101974016, length=3D131072)]error = =3D 28 =20 g_vfs_done():virstor/test[WRITE(offset=3D102105088, length=3D131072)]error = =3D 28 g_vfs_done():virstor/test[WRITE(offset=3D102236160, length=3D131072)]error = =3D 28 g_vfs_done():virstor/test[WRITE(offset=3D102367232, length=3D131072)]error = =3D 28 g_vfs_done():virstor/test[WRITE(offset=3D102498304, length=3D131072)]error = =3D 28 g_vfs_done():virstor/test[WRITE(offset=3D102760448, length=3D131072)]error = =3D 28 g_vfs_done():virstor/test[WRITE(offset=3D102891520, length=3D131072)]error = =3D 28 g_vfs_done():virstor/test[WRITE(offset=3D103022592, length=3D131072)]error = =3D 28 g_vfs_done():virstor/test[WRITE(offset=3D103153664, length=3D131072)]error = =3D 28 g_vfs_done():virstor/test[WRITE(offset=3D103284736, length=3D131072)]error = =3D 28 g_vfs_done():virstor/test[WRITE(offset=3D103415808, length=3D131072)]error = =3D 28 g_vfs_done():virstor/test[WRITE(offset=3D103546880, length=3D131072)]error = =3D 28 g_vfs_done():virstor/test[WRITE(offset=3D103677952, length=3D131072)]error = =3D 28 As you can see the offset increases, so this is not the same I/O request. I'd suggest turning off gvirstor debugging and retry. We should probably also rate-limit errors from g_vfs_done(). --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --rQ2U398070+RC21q Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFFxIt3ForvXbEpPzQRAq9fAJ0RoJieB0/Nw7IKLZy5m4dR3EngtACgr5du AgHzJiDWRCU0FEV5hzA1tD8= =43XW -----END PGP SIGNATURE----- --rQ2U398070+RC21q--