summaryrefslogtreecommitdiffstats
path: root/sys-utils/swapon.8
diff options
context:
space:
mode:
authorKarel Zak2019-01-21 12:44:49 +0100
committerKarel Zak2019-01-21 12:54:20 +0100
commiteebfa469fcd07eb020dc4d6f1ae1a661d4b365ee (patch)
tree8855288cd552443d83eee5f2a8c18e485cb0616a /sys-utils/swapon.8
parentmount: (man) add note about --all to remount desc (diff)
downloadkernel-qcow2-util-linux-eebfa469fcd07eb020dc4d6f1ae1a661d4b365ee.tar.gz
kernel-qcow2-util-linux-eebfa469fcd07eb020dc4d6f1ae1a661d4b365ee.tar.xz
kernel-qcow2-util-linux-eebfa469fcd07eb020dc4d6f1ae1a661d4b365ee.zip
swapon: (man) cleanup note about holes
Addresses: https://github.com/karelzak/util-linux/issues/633 Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'sys-utils/swapon.8')
-rw-r--r--sys-utils/swapon.820
1 files changed, 9 insertions, 11 deletions
diff --git a/sys-utils/swapon.8 b/sys-utils/swapon.8
index 510a15fd0..aea45b2f5 100644
--- a/sys-utils/swapon.8
+++ b/sys-utils/swapon.8
@@ -195,18 +195,16 @@ This can be seen in the system log as
.B "swapon: swapfile has holes."
.sp
.RE
-The swap file implementation in the kernel expects to be able to write to the
-file directly, without the assistance of the filesystem. This is a problem on
-preallocated files (e.g.
-.BR fallocate (1))
-on filesystems like \fBXFS\fR or \fBext4\fR, and on copy-on-write
-filesystems like \fBbtrfs\fR.
-.PP
-It is recommended to use
+The swap file implementation in the kernel expects to be able to write to the file directly,
+without the assistance of the filesystem. This is a problem on files with holes
+(e.g. created by
+.BR cp (1)
+or another commands), or on files on copy-on-write filesystems like
+.BR btrfs .
+In some cases preallocated files (e.g. fallocate(1) on XFS) maybe interpreted
+by kernel as files with holes too. The most portable solution is to use
.BR dd (1)
-and
-.I /dev/zero
-to avoid holes on XFS and ext4.
+and /dev/zero in these cases.
.PP
.B swapon
may not work correctly when using a swap file with some versions of