tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: unconfiguring swap at shutdown
On Sat Aug 30 2008 at 16:33:28 -0400, Christos Zoulas wrote:
> Index: kern/vfs_subr.c
> ===================================================================
> RCS file: /cvsroot/src/sys/kern/vfs_subr.c,v
> retrieving revision 1.355
> diff -u -u -r1.355 vfs_subr.c
> --- kern/vfs_subr.c 31 Jul 2008 05:38:05 -0000 1.355
> +++ kern/vfs_subr.c 28 Aug 2008 15:52:33 -0000
> @@ -114,6 +114,7 @@
> #include <uvm/uvm.h>
> #include <uvm/uvm_readahead.h>
> #include <uvm/uvm_ddb.h>
> +#include <uvm/uvm_swap.h>
>
> #include <sys/sysctl.h>
>
> @@ -2333,6 +2334,13 @@
> if (panicstr != NULL)
> return;
>
> +#if defined(_KERNEL) && !defined(_RUMPKERNEL)
> + /*
> + * We need to turn off swap first before we unmount
> + * /dev, because otherwise the spec_vnodes are bad.
> + */
> + uvm_swap_shutdown(l);
> +#endif
> /* Release inodes held by texts before update. */
> #ifdef notdef
> vnshutdown();
Regardless of the outcome of the rest of the discussion, please do not add
ifdefs like this. Just add dummy symbols where necessary. Eventually I
want to use kernel modules as shared libs in userspace and things like
this take us further away (not that we'd necessary ever load vfs_subr,
but I'm talking about the general case).
Home |
Main Index |
Thread Index |
Old Index