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)
Thu, Apr 18, 3:08 AM
Unknown Object (File)
Thu, Apr 18, 3:05 AM
Unknown Object (File)
Mar 22 2024, 8:20 PM
Unknown Object (File)
Mar 22 2024, 12:22 PM
Unknown Object (File)
Mar 22 2024, 10:11 AM
Unknown Object (File)
Mar 8 2024, 2:40 PM
Unknown Object (File)
Mar 7 2024, 10:22 PM
Unknown Object (File)
Mar 7 2024, 7:13 PM
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.