Date: Mon, 10 Apr 2006 12:41:18 +0200 From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern kern_shutdown.c src/sys/vm swap_pager.c swap_pager.h Message-ID: <20060410104118.GD3728@garage.freebsd.pl> In-Reply-To: <200604101003.k3AA3iMK023510@repoman.freebsd.org> References: <200604101003.k3AA3iMK023510@repoman.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
On Mon, Apr 10, 2006 at 10:03:41AM +0000, Pawel Jakub Dawidek wrote:
+> pjd 2006-04-10 10:03:41 UTC
+>
+> FreeBSD src repository
+>
+> Modified files:
+> sys/kern kern_shutdown.c
+> sys/vm swap_pager.c swap_pager.h
+> Log:
+> On shutdown try to turn off all swap devices. This way GEOM providers are
+> properly closed on shutdown.
The hard situation to solve is when we have, eg. file-backed md(4)
devices which we use as a swap device. We can also configure swap-backed
md(4) device and create and mount file system on it.
To solve such complex scenario we need to reimplement vfs_unmountall()
and swapoff_all() to return number of unmounted file system (removed
swap devices) and do something like:
vfs_unmountall();
swapoff_all();
for (;;) {
n = vfs_unmountall();
if (n == 0)
break;
n = swapoff_all();
if (n == 0)
break;
}
--
Pawel Jakub Dawidek http://www.wheel.pl
pjd@FreeBSD.org http://www.FreeBSD.org
FreeBSD committer Am I Evil? Yes, I Am!
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (FreeBSD)
iD8DBQFEOjZOForvXbEpPzQRAhZIAKDWrQz4r8U42iElBZvM51z95dULfgCg1wAl
kXPitBaBT/lLl9BAugwS9po=
=oH9v
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060410104118.GD3728>
