From owner-freebsd-fs@FreeBSD.ORG Wed Mar 14 16:10:57 2007 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6DFB016A406 for ; Wed, 14 Mar 2007 16:10:57 +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 F07D013C487 for ; Wed, 14 Mar 2007 16:10:56 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 73134487F3; Wed, 14 Mar 2007 17:10:54 +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 42CE54569A; Wed, 14 Mar 2007 17:10:43 +0100 (CET) Date: Wed, 14 Mar 2007 17:10:41 +0100 From: Pawel Jakub Dawidek To: David Cecil Message-ID: <20070314161041.GI7847@garage.freebsd.pl> References: <45F776AE.8090702@nokia.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="aFi3jz1oiPowsTUB" Content-Disposition: inline In-Reply-To: <45F776AE.8090702@nokia.com> 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: freebsd-fs@freebsd.org Subject: Re: FFS writes to read-only mount X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2007 16:10:57 -0000 --aFi3jz1oiPowsTUB Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 14, 2007 at 02:14:38PM +1000, David Cecil wrote: > Hi, >=20 > I have seen the following message (or equivalent) occasionally on a FreeB= SD 6.1 system: > g_vfs_done():mirror/gm0s1a[WRITE(offset=3D1349091328, length=3D16384)]err= or =3D 1 >=20 > The partition in question is the root partition, and it is mounted read-o= nly. I have verified that the problem occurs due to the write request retu= rning EPERM due to the=20 > check in g_io_check: > case BIO_WRITE: > case BIO_DELETE: > if (cp->acw =3D=3D 0) > return (EPERM); >=20 > I have been trying to determine what within FFS would be trying to write = to the partition. The "bio_from" in the bio structure indicates (in the ge= om) that it's=20 > ffs.mirror/gm0s1a that's trying to write. The contents of the buffer loo= ks somewhat like a directory (lots of files listed, but comparison to the a= ctual directory that=20 > contians these files reveals it's somewhat different), followed by a bina= ry (ELF header). However, I'm at a loss to understand who's actually doing= the writing. Is it=20 > coming from within FFS or is there an application that's done the write? = (I can't understand how an application would be permitted to do it though.) >=20 > I have seen this sort of problem (same error number) reported on the Inte= rnet occasionally, but it doesn't seem it's been satisfactorily resolved in= all instances. >=20 > Any help you can provide would be much appreciated. Will be good if you could place kdb_enter() into g_vfs_done() error path and once in DDB try which processes wait for I/O and collect their backtraces or just put output of 'alltrace' on some web page. --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --aFi3jz1oiPowsTUB Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFF+B6BForvXbEpPzQRAsmUAJ9q1BSCE2MK3t5A6FbOCbWm6x09+wCg5Lso 7/uhJVDJt/nw9ZFsc9o6FNQ= =3qfq -----END PGP SIGNATURE----- --aFi3jz1oiPowsTUB--