From owner-freebsd-arch@FreeBSD.ORG Wed Oct 6 22:03:10 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A385B16A4CE for ; Wed, 6 Oct 2004 22:03:10 +0000 (GMT) Received: from darkness.comp.waw.pl (darkness.comp.waw.pl [195.117.238.136]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4C29243D49 for ; Wed, 6 Oct 2004 22:03:10 +0000 (GMT) (envelope-from pjd@darkness.comp.waw.pl) Received: by darkness.comp.waw.pl (Postfix, from userid 1009) id 7D696ACAFB; Thu, 7 Oct 2004 00:03:08 +0200 (CEST) Date: Thu, 7 Oct 2004 00:03:08 +0200 From: Pawel Jakub Dawidek To: freebsd-arch@freebsd.org Message-ID: <20041006220308.GP73767@darkness.comp.waw.pl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="jx/LfW4V5TfZLeq7" Content-Disposition: inline User-Agent: Mutt/1.4.2i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 5.2.1-RC2 i386 Subject: swapoff_all() X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Oct 2004 22:03:10 -0000 --jx/LfW4V5TfZLeq7 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi. As you know, or not, some GEOM classes (gmirror, graid3) set DIRTY flag on devices which are open for writing to be able to detect power failures, panics, etc. and rebuild device when needed. DIRTY flag is removed on last device close. (BTW. UFS uses simlar mechanism to detect dirty file systems.) When only file systems are mounted on those devices, there is no problem, because file systems are unmounted on shutdown. When one is using swap on mirror/raid3 things are worse, because to remove DRITY flag, he has to turn off swap devices. I introduced a workaround some time ago, which allows to remove swap partition on shutdown via rc.shutdown script. This is a workaround, so there are some issues: - One has to use shutdown(8) command, reboot(8) is not enough. - If there are still processes which use swap, this could be problematic to remove swap devices. This patch: http://people.freebsd.org/~pjd/patches/swapoff_all.patch removes all swap devices after all file systems are unmounted, so there should be no processes which use swap and it of course works even for reboot(8). I'll be grateful for reviews/tests/comments. --=20 Pawel Jakub Dawidek http://www.FreeBSD.org pjd@FreeBSD.org http://garage.freebsd.pl FreeBSD committer Am I Evil? Yes, I Am! --jx/LfW4V5TfZLeq7 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFBZGucForvXbEpPzQRAlSMAKCOzFeVLlOuXd20bYe+lcfI0QqMkgCgw/TI fnaoHnQQtvp/RoUrcXaZCbU= =jO5L -----END PGP SIGNATURE----- --jx/LfW4V5TfZLeq7--