]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
docs: unify mkswap(8) with swapon(8) about holes warning
authorSami Kerola <kerolasa@iki.fi>
Sun, 7 Jun 2015 20:51:51 +0000 (21:51 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 29 Jun 2015 10:06:00 +0000 (12:06 +0200)
Reviewed-by: Dave Rutherford <dave@evilpettingzoo.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
disk-utils/mkswap.8

index 0a0b715dd58b6cde4ea4f84a020aeca9d0fc5857..3655357bd03616c6fc66b0cfd66e0ecb8ebc5dd7 100644 (file)
@@ -128,9 +128,19 @@ e.g.\& using a command like
 .RE
 .fi
 
-Note that a swap file must not contain any holes (so, using
+Note that a swap file must not contain any holes.  Using
 .BR cp (1)
-to create the file is not acceptable).
+to create the file is not acceptable.  Neither is use of
+.BR fallocate (1)
+on file systems that support preallocated files, such as
+.BR XFS " or " ext4 ,
+or on copy-on-write filesystems like
+.BR btrfs .
+It is recommended to use
+.BR dd (1)
+and /dev/zero in these cases.  Please read notes from
+.BR swapon (8)
+before adding a swap file to copy-on-write filesystems.
 
 .SH ENVIRONMENT
 .IP LIBBLKID_DEBUG=all