Page MenuHomeFreeBSD

swapoff: Remove only late devices with -aL.
ClosedPublic

Authored by jilles on Oct 2 2016, 9:16 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Dec 10, 5:36 PM
Unknown Object (File)
Mon, Dec 9, 8:06 AM
Unknown Object (File)
Sep 20 2024, 1:12 PM
Unknown Object (File)
Sep 4 2024, 11:39 AM
Unknown Object (File)
Sep 1 2024, 12:22 PM
Unknown Object (File)
Aug 12 2024, 10:21 PM
Unknown Object (File)
Aug 12 2024, 8:51 AM
Unknown Object (File)
Aug 6 2024, 11:06 AM
Subscribers

Details

Summary

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

Test Plan

Manual testing only: verified that a swap file was or was not removed after
'shutdown now'.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jilles retitled this revision from to swapoff: Remove only late devices with -aL..
jilles updated this object.
jilles edited the test plan for this revision. (Show Details)
jilles added a reviewer: peter.

Man page changes look okay. Given the choice, I'd change all of them from "will be" to "are", but that's out of the scope of this change.

ngie edited edge metadata.

Thank you for fixing up the documentation for swapon(8). The change looks good -- thank you!

This revision is now accepted and ready to land.Oct 21 2016, 9:22 PM
This revision was automatically updated to reflect the committed changes.