]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r307755: swapoff: Remove only late devices with -aL.
authorjilles <jilles@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sun, 20 Nov 2016 13:44:27 +0000 (13:44 +0000)
committerjilles <jilles@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sun, 20 Nov 2016 13:44:27 +0000 (13:44 +0000)
commit8924fd8a4d35a2e4b78b767fe12e280f82bd6f39
tree1d6e455c2ac5f7dac0f8fd66994c90c6d3f63843
parent244e8b2dc188624ebd5d0cd7e9fa24f1f506ec26
MFC r307755: swapoff: Remove only late devices with -aL.

Currently, '/etc/rc.d/swaplate stop' removes all swap devices. This can be
very slow and may not even be possible if there is a lot of swap space in
use. However, removing swap devices is only needed for late swap devices
that may depend on daemons that subsequent shutdown steps stop. Normal swap
devices such as hard disk partitions will remain available throughout the
shutdown process and need not be removed.

In swapoff, interpret -aL to remove late swap devices only, and use this in
etc/rc.d/swaplate. The meaning of -aL in swapon remains unchanged (add all
swap devices, both normal and late).

PR: 187081

git-svn-id: svn://svn.freebsd.org/base/stable/10@308886 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
etc/rc.d/swaplate
sbin/swapon/swapon.8
sbin/swapon/swapon.c