Date: Thu, 7 Oct 2004 00:03:08 +0200 From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: freebsd-arch@freebsd.org Subject: swapoff_all() Message-ID: <20041006220308.GP73767@darkness.comp.waw.pl>
next in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041006220308.GP73767>