Blame SOURCES/1120294-madvise.2-MADV_REMOVE-supports-more-filesystems.patch

5a015b
From 82a40d2b088b5207ecb8f8861ebd4babfd10385a Mon Sep 17 00:00:00 2001
5a015b
From: Jan Chaloupka <jchaloup@redhat.com>
5a015b
Date: Mon, 27 Oct 2014 13:02:32 +0100
5a015b
Subject: [PATCH] madvise.2 MADV_REMOVE supports more filesystems
5a015b
5a015b
---
5a015b
 man-pages/en/man2/madvise.2 | 20 ++++++++++++++------
5a015b
 man-pages/man2/fallocate.2  | 11 +++++++++++
5a015b
 man-pages/man2/madvise.2    | 20 ++++++++++++++------
5a015b
 3 files changed, 39 insertions(+), 12 deletions(-)
5a015b
5a015b
diff --git a/man-pages/en/man2/madvise.2 b/man-pages/en/man2/madvise.2
5a015b
index 4e693da..460726a 100644
5a015b
--- a/man-pages/en/man2/madvise.2
5a015b
+++ b/man-pages/en/man2/madvise.2
5a015b
@@ -101,11 +101,18 @@ without an underlying file.
5a015b
 .BR MADV_REMOVE " (Since Linux 2.6.16)"
5a015b
 Free up a given range of pages
5a015b
 and its associated backing store.
5a015b
-Currently,
5a015b
-.\" 2.6.18-rc5
5a015b
-only shmfs/tmpfs supports this; other file systems return with the
5a015b
-error
5a015b
-.BR ENOSYS .
5a015b
+Originally, only shmfs/tmpfs supported this; but since Linux 3.5,
5a015b
+any filesystem which supports the
5a015b
+.BR fallocate(2)
5a015b
+mode
5a015b
+.BR FALLOC_FL_PUNCH_HOLE
5a015b
+also supports the
5a015b
+.BR madvise(2)
5a015b
+advice
5a015b
+.BR MADV_REMOVE .
5a015b
+Other filesystems return with the
5a015b
+.BR EOPNOTSUPP
5a015b
+error.
5a015b
 .\" Databases want to use this feature to drop a section of their
5a015b
 .\" bufferpool (shared memory segments) - without writing back to
5a015b
 .\" disk/swap space.  This feature is also useful for supporting
5a015b
@@ -375,7 +382,8 @@ from the system call, as it should).
5a015b
 .BR mprotect (2),
5a015b
 .BR msync (2),
5a015b
 .BR munmap (2),
5a015b
-.BR core (5)
5a015b
+.BR core (5),
5a015b
+.BR fallocate (2)
5a015b
 .SH COLOPHON
5a015b
 This page is part of release 3.53 of the Linux
5a015b
 .I man-pages
5a015b
diff --git a/man-pages/man2/fallocate.2 b/man-pages/man2/fallocate.2
5a015b
index be9dbcd..4e68a3f 100644
5a015b
--- a/man-pages/man2/fallocate.2
5a015b
+++ b/man-pages/man2/fallocate.2
5a015b
@@ -109,6 +109,17 @@ does not change.
5a015b
 Not all file systems support
5a015b
 .BR FALLOC_FL_PUNCH_HOLE ;
5a015b
 if a file system doesn't support the operation, an error is returned.
5a015b
+The operation is supported on at least the following filesystems:
5a015b
+.IP * 3
5a015b
+XFS (since Linux 2.6.38)
5a015b
+.IP *
5a015b
+ext4 (since Linux 3.0)
5a015b
+.\" commit a4bb6b64e39abc0e41ca077725f2a72c868e7622
5a015b
+.IP *
5a015b
+Btrfs (since Linux 3.7)
5a015b
+.IP *
5a015b
+tmpfs (since Linux 3.5)
5a015b
+.\" commit 83e4fa9c16e4af7122e31be3eca5d57881d236fe
5a015b
 .SH RETURN VALUE
5a015b
 On success,
5a015b
 .BR fallocate ()
5a015b
diff --git a/man-pages/man2/madvise.2 b/man-pages/man2/madvise.2
5a015b
index 4e693da..460726a 100644
5a015b
--- a/man-pages/man2/madvise.2
5a015b
+++ b/man-pages/man2/madvise.2
5a015b
@@ -101,11 +101,18 @@ without an underlying file.
5a015b
 .BR MADV_REMOVE " (Since Linux 2.6.16)"
5a015b
 Free up a given range of pages
5a015b
 and its associated backing store.
5a015b
-Currently,
5a015b
-.\" 2.6.18-rc5
5a015b
-only shmfs/tmpfs supports this; other file systems return with the
5a015b
-error
5a015b
-.BR ENOSYS .
5a015b
+Originally, only shmfs/tmpfs supported this; but since Linux 3.5,
5a015b
+any filesystem which supports the
5a015b
+.BR fallocate(2)
5a015b
+mode
5a015b
+.BR FALLOC_FL_PUNCH_HOLE
5a015b
+also supports the
5a015b
+.BR madvise(2)
5a015b
+advice
5a015b
+.BR MADV_REMOVE .
5a015b
+Other filesystems return with the
5a015b
+.BR EOPNOTSUPP
5a015b
+error.
5a015b
 .\" Databases want to use this feature to drop a section of their
5a015b
 .\" bufferpool (shared memory segments) - without writing back to
5a015b
 .\" disk/swap space.  This feature is also useful for supporting
5a015b
@@ -375,7 +382,8 @@ from the system call, as it should).
5a015b
 .BR mprotect (2),
5a015b
 .BR msync (2),
5a015b
 .BR munmap (2),
5a015b
-.BR core (5)
5a015b
+.BR core (5),
5a015b
+.BR fallocate (2)
5a015b
 .SH COLOPHON
5a015b
 This page is part of release 3.53 of the Linux
5a015b
 .I man-pages
5a015b
-- 
5a015b
1.9.3
5a015b