]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
fallocate: add man page note about --collapse-range granularity
authorKarel Zak <kzak@redhat.com>
Tue, 3 Jul 2018 11:51:51 +0000 (13:51 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 3 Jul 2018 11:51:51 +0000 (13:51 +0200)
Reported-by: Radka Skvarilova <rskvaril@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/fallocate.1
sys-utils/fallocate.c

index d4821dcd17dc63f4abfab85f4572f0b99aa353c8..fe5072ae86814d9410faa7b41e983d55fad9829a 100644 (file)
@@ -72,6 +72,12 @@ The option
 may not be specified for the collapse-range operation.
 .sp
 Available since Linux 3.15 for ext4 (only for extent-based files) and XFS.
+.sp
+A filesystem may place limitations on the granularity of the operation, in
+order to ensure efficient implementation.  Typically, offset and len must be a
+multiple of the filesystem logical block size, which varies according to the
+filesystem type and configuration.  If a filesystem has such a requirement,
+the operation will fail with the error EINVAL if this requirement is violated.
 .TP
 .BR \-d ", " \-\-dig\-holes
 Detect and dig holes.
index c6bed63ef7698eb1f07d9d6727c40587f6f0516c..c97e63d4b33c1351ebc03a771bd9d9473936be6f 100644 (file)
@@ -121,6 +121,9 @@ static loff_t cvtnum(char *s)
 static void xfallocate(int fd, int mode, off_t offset, off_t length)
 {
        int error;
+
+fprintf(stderr, "KZAK>>> %d\n", mode);
+
 #ifdef HAVE_FALLOCATE
        error = fallocate(fd, mode, offset, length);
 #else