Skip to contentSkip to conversation

manpage: update FALLOC_FL_COLLAPSE_RANGE flag in fallocate

PATCH Superseded Namjae Jeon 1 participant 1 message Sep 8, 2013 VFS

v3 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 7/7 manpage: update FALLOC_FL_COLLAPSE_RANGE flag in fallocate

From: Namjae Jeon <[email protected]>

Update FALLOC_FL_COLLAPSE_RANGE flag in fallocate.

---
 man2/fallocate.2 |   17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)
man2/fallocate.2 +16 -1
index f5c395d..b042c59 100644
@@ -7,6 +7,7 @@
 .\"
 .\" 2011-09-19: Added FALLOC_FL_PUNCH_HOLE
 .\" 2011-09-19: Substantial restructuring of the page
+.\" 2013-09-01: Added FALLOC_FL_COLLAPSE_RANGE
 .\"
 .TH FALLOCATE 2 2013-06-10 "Linux" "Linux Programmer's Manual"
 .SH NAME
@@ -109,6 +110,19 @@ does not change.
 Not all filesystems support
 .BR FALLOC_FL_PUNCH_HOLE ;
 if a filesystem doesn't support the operation, an error is returned.
+.SS Collapsing file space
+Specifiying the
+.BR FALLOC_FL_COLLAPSE_RANGE
+flag in
+.I mode
+collapse space in the byte range starting at
+.I offset
+and continuing for
+.I len
+bytes, where the offset and len are aligned with block size of filesystem.
+Within the specified range, it first de-allocates blocks and eliminates
+the hole created in this process by shifting data blocks into the hole.
+
 .SH RETURN VALUE
 On success,
 .BR fallocate ()
@@ -139,7 +153,8 @@ was less than 0, or
 .\" See "Re: [PATCH] fallocate.2: add FALLOC_FL_PUNCH_HOLE flag definition"
 .\" 21 Sep 2012
 .\" http://thread.gmane.org/gmane.linux.file-systems/48331/focus=1193526
-was less than or equal to 0.
+was less than or equal to 0 or in case of FALLOC_FL_COLLAPSE_RANGE
+offset and len are not aligned with file system's block size.
 .TP
 .B EIO
 An I/O error occurred while reading from or writing to a filesystem.
Signature · 6 lines
1.7.9.5

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs