From owner-freebsd-questions@FreeBSD.ORG Thu Aug 23 09:25:55 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7826616A46E for ; Thu, 23 Aug 2007 09:25:55 +0000 (UTC) (envelope-from karol.kwiat@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.189]) by mx1.freebsd.org (Postfix) with ESMTP id E708813C480 for ; Thu, 23 Aug 2007 09:25:54 +0000 (UTC) (envelope-from karol.kwiat@gmail.com) Received: by nf-out-0910.google.com with SMTP id b2so387047nfb for ; Thu, 23 Aug 2007 02:25:53 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:reply-to:user-agent:mime-version:to:cc:subject:references:in-reply-to:x-enigmail-version:openpgp:content-type; b=FFFRDSGobhvyzcSSmYbj7KlhHzhHoUOaIzIOxGhTeo0wITBHSi+NDQJ7YI8CORdLguLfKEMSSPdGn9uIvCnHvD2kIi/Dnz9GJcmQiXG3JAxLNxyrYmzUXIiuj5lN4pMmH9YLlKIh4A0NCZdeOeKRpVK837If7HtoA1vEDTBOMuc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:reply-to:user-agent:mime-version:to:cc:subject:references:in-reply-to:x-enigmail-version:openpgp:content-type; b=Y8bIJ9fDKpcd9atOGzpZWSIhDHuvdSISx6dVrBb0uJ30jffvWgc0Tzlq824zG7Ftx0CN8EHx1mwys4nppXeCl248ElqXDKCNAI0BXtOfL1QH1I6dnsxjaUr9+bY5lDBx8T8GwYGnbEWYnJysSpwasDxW+fDinjeTOGtTrIc+25s= Received: by 10.86.63.19 with SMTP id l19mr1233445fga.1187861152996; Thu, 23 Aug 2007 02:25:52 -0700 (PDT) Received: from persephone.orchid.homeunix.org ( [84.10.173.180]) by mx.google.com with ESMTPS id f31sm3146057fkf.2007.08.23.02.25.50 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 23 Aug 2007 02:25:52 -0700 (PDT) Message-ID: <46CD5295.4050406@gmail.com> Date: Thu, 23 Aug 2007 11:25:41 +0200 From: Karol Kwiatkowski User-Agent: Thunderbird 2.0.0.6 (X11/20070803) MIME-Version: 1.0 To: Ian Smith References: In-Reply-To: X-Enigmail-Version: 0.95.2 OpenPGP: id=06E09309; url=http://www.orchid.homeunix.org/carlos/gpg/0x06E09309.asc Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig75D7E585DC9B67D0B6B863A4" Cc: Chris , freebsd-questions@freebsd.org, Bill Moran Subject: Re: fsck strangeness X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: karol.kwiat@gmail.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Aug 2007 09:25:55 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig75D7E585DC9B67D0B6B863A4 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Ian Smith wrote: > On Thu, 23 Aug 2007, Karol Kwiatkowski wrote: > > Ian Smith wrote: > > > On Wed, 22 Aug 2007, Chris wrote: > > > > If its bad to run fsck on a mounted read,write then why does > > > > background fsck do it? or you talking about foreground fsck onl= y? > > >=20 > > > Well I was referring to foreground fsck, and I still don't know wh= y > > > running it on a mounted fs is 'bad' when fsck runs in 'NO WRITE' m= ode > > > anyway when it finds a fs is mounted, hence my query above. > >=20 > > Here's my understanding: > >=20 > > Mounted fs (rw) isn't in stable state, there may be some writes to i= t - > > daemons, buffers flushes, etc. In this condition fsck can report > > inconsistency. And fsck running in 'NO WRITE' won't help anyway :) >=20 > a) Absolutely. >=20 > b) Indeed it usually does, fairly consistently, especially on /var. >=20 > c) No it won't help (except where it can help locate problems in a real= =20 > mess like bad blocks), but the assertion in question was, can it hurt? Ah sorry, I missed that. With 'NO WRITE' one can suppose it shouldn't hurt anything except performance ;) I made a quick scan through the source and it looks like it won't: - in src/sbin/fsck_ffs/setup.c if fs is mounted rw fswritefd is set to -1 - in src/sbin/fsck_ffs/fsutil.c blwrite(), flush() and ckfini() won't write anything if fswritefd<0 Unless, of course, I'm missing something. Cheers, Karol --=20 Karol Kwiatkowski OpenPGP 0x06E09309 --------------enig75D7E585DC9B67D0B6B863A4 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iQEVAwUBRs1SnQhgT0HIecD5AQiABggAn8CojkhT5LsKG9B7rf4wgO1/Qk61mKR3 q9ZPPZcVzv2/UOS3ysDeBbkybc5+hTkD+b8Zpxe3e0Mlv8bqcJ3bdGRld2skuNls 7QamVHg68ZyQj0AZoXlRTZ4PjPfFCnabqevBRlxW/o04xr/DcqKeH1+C7Mb1h/QJ OatYAxIbZg94gocz0Io9E513qLQZfx/RUM2mU7FRoJVkw20hAIyKdtMOiTqcl7av J3G3QF0/ND0qu9C6q3EdjU0/t31i/wxS0vs/pHzBVvIhmslYPwpWaF1m7QwxIBYN oZls1ogToPgf4onpyq2wjnRiUICylOjggeUcQWepGTJjoBbO/aPftw== =/J53 -----END PGP SIGNATURE----- --------------enig75D7E585DC9B67D0B6B863A4--