cvs commit: src/sys/kern kern_shutdown.c src/sys/vm swap_pager.c swap_pager.h

Pawel Jakub Dawidek pjd at
Mon Apr 10 10:42:35 UTC 2006

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:

	for (;;) {
		n = vfs_unmountall();
		if (n == 0)
		n = swapoff_all();
		if (n == 0)

Pawel Jakub Dawidek             
pjd at                 
FreeBSD committer                         Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url :

More information about the cvs-src mailing list