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

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