aboutsummaryrefslogtreecommitdiff
path: root/sbin/swapon/swapon.8
diff options
context:
space:
mode:
authorDoug Moore <dougm@FreeBSD.org>2019-06-22 03:16:01 +0000
committerDoug Moore <dougm@FreeBSD.org>2019-06-22 03:16:01 +0000
commita616b25342fe1ceaa2bb7c68d9791f6586656fed (patch)
treeac967fdccd994b44abc70806ef55ee8295961017 /sbin/swapon/swapon.8
parentdf8406543fab98a6706bb41f3093863b93d92b91 (diff)
downloadsrc-a616b25342fe1ceaa2bb7c68d9791f6586656fed.tar.gz
src-a616b25342fe1ceaa2bb7c68d9791f6586656fed.zip
Modify swapon(8) to invoke BIO_DELETE to trim swap devices, either if
'-E' appears on the swapon command line, or if "trimonce" appears as an fstab option. Discussed at: BSDCAN Tested by: markj Reviewed by: markj Approved by: markj (mentor) Differential Revision:https://reviews.freebsd.org/D20599
Notes
Notes: svn path=/head/; revision=349286
Diffstat (limited to 'sbin/swapon/swapon.8')
-rw-r--r--sbin/swapon/swapon.89
1 files changed, 7 insertions, 2 deletions
diff --git a/sbin/swapon/swapon.8 b/sbin/swapon/swapon.8
index 058f681ce5ce..f69dd484a93b 100644
--- a/sbin/swapon/swapon.8
+++ b/sbin/swapon/swapon.8
@@ -28,7 +28,7 @@
.\" @(#)swapon.8 8.1 (Berkeley) 6/5/93
.\" $FreeBSD$
.\"
-.Dd October 21, 2016
+.Dd June 21, 2019
.Dt SWAPON 8
.Os
.Sh NAME
@@ -38,7 +38,7 @@
.Nm swapon
.Oo Fl F Ar fstab
.Oc
-.Fl aLq | Ar
+.Fl aLq | E Ar
.Nm swapoff
.Oo Fl F Ar fstab
.Oc
@@ -86,6 +86,11 @@ If the
option is used,
informational messages will not be
written to standard output when a swap device is added.
+The
+.Fl E
+option causes each of following devices to receive a
+.Dv BIO_DELETE
+command to mark all blocks as unused.
.Pp
The
.Nm swapoff