aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRichard Yao <[email protected]>2012-07-23 11:39:25 -0700
committerBrian Behlendorf <[email protected]>2012-07-23 12:29:36 -0700
commit739a1a82e0f366923e8d9bc8f9ad4b1c680a780b (patch)
tree33d846b16ea8ddaf39bb77a8658e63d640794fee /include
parentea1fdf46e2d37e9eb048f9add0fb06e77e9ee6e2 (diff)
Linux 3.5 compat, end_writeback() changed to clear_inode()
The end_writeback() function was changed by moving the call to inode_sync_wait() earlier in to evict(). This effecitvely changes the ordering of the sync but it does not impact the details of the zfs implementation. However, as part of this change end_writeback() was renamed to clear_inode() to reflect the new semantics. This change does impact us and clear_inode() now maps to end_writeback() for kernels prior to 3.5. Signed-off-by: Richard Yao <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #784
Diffstat (limited to 'include')
-rw-r--r--include/Makefile.in1
-rw-r--r--include/linux/Makefile.in1
-rw-r--r--include/linux/vfs_compat.h10
-rw-r--r--include/sys/Makefile.in1
-rw-r--r--include/sys/fm/Makefile.in1
-rw-r--r--include/sys/fm/fs/Makefile.in1
-rw-r--r--include/sys/fs/Makefile.in1
7 files changed, 16 insertions, 0 deletions
diff --git a/include/Makefile.in b/include/Makefile.in
index 0eae5fb43..4bacc977d 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -66,6 +66,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-blkdev-get-by-path.m4 \
$(top_srcdir)/config/kernel-blkdev-get.m4 \
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
+ $(top_srcdir)/config/kernel-clear-inode.m4 \
$(top_srcdir)/config/kernel-create-umode-t.m4 \
$(top_srcdir)/config/kernel-d-make-root.m4 \
$(top_srcdir)/config/kernel-d-obtain-alias.m4 \
diff --git a/include/linux/Makefile.in b/include/linux/Makefile.in
index f4fe8f60c..cdf0e1c62 100644
--- a/include/linux/Makefile.in
+++ b/include/linux/Makefile.in
@@ -66,6 +66,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-blkdev-get-by-path.m4 \
$(top_srcdir)/config/kernel-blkdev-get.m4 \
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
+ $(top_srcdir)/config/kernel-clear-inode.m4 \
$(top_srcdir)/config/kernel-create-umode-t.m4 \
$(top_srcdir)/config/kernel-d-make-root.m4 \
$(top_srcdir)/config/kernel-d-obtain-alias.m4 \
diff --git a/include/linux/vfs_compat.h b/include/linux/vfs_compat.h
index 74ec95f08..9343f99a5 100644
--- a/include/linux/vfs_compat.h
+++ b/include/linux/vfs_compat.h
@@ -121,4 +121,14 @@ typedef umode_t zpl_umode_t;
typedef int zpl_umode_t;
#endif
+/*
+ * 3.5 API change,
+ * The clear_inode() function replaces end_writeback() and introduces an
+ * ordering change regarding when the inode_sync_wait() occurs. See the
+ * configure check in config/kernel-clear-inode.m4 for full details.
+ */
+#if defined(HAVE_EVICT_INODE) && !defined(HAVE_CLEAR_INODE)
+#define clear_inode(ip) end_writeback(ip)
+#endif /* HAVE_EVICT_INODE && !HAVE_CLEAR_INODE */
+
#endif /* _ZFS_VFS_H */
diff --git a/include/sys/Makefile.in b/include/sys/Makefile.in
index b86bfd8cb..e6e880bab 100644
--- a/include/sys/Makefile.in
+++ b/include/sys/Makefile.in
@@ -66,6 +66,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-blkdev-get-by-path.m4 \
$(top_srcdir)/config/kernel-blkdev-get.m4 \
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
+ $(top_srcdir)/config/kernel-clear-inode.m4 \
$(top_srcdir)/config/kernel-create-umode-t.m4 \
$(top_srcdir)/config/kernel-d-make-root.m4 \
$(top_srcdir)/config/kernel-d-obtain-alias.m4 \
diff --git a/include/sys/fm/Makefile.in b/include/sys/fm/Makefile.in
index 349f9a551..9d2aff60b 100644
--- a/include/sys/fm/Makefile.in
+++ b/include/sys/fm/Makefile.in
@@ -66,6 +66,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-blkdev-get-by-path.m4 \
$(top_srcdir)/config/kernel-blkdev-get.m4 \
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
+ $(top_srcdir)/config/kernel-clear-inode.m4 \
$(top_srcdir)/config/kernel-create-umode-t.m4 \
$(top_srcdir)/config/kernel-d-make-root.m4 \
$(top_srcdir)/config/kernel-d-obtain-alias.m4 \
diff --git a/include/sys/fm/fs/Makefile.in b/include/sys/fm/fs/Makefile.in
index 810a59983..feac8f9fb 100644
--- a/include/sys/fm/fs/Makefile.in
+++ b/include/sys/fm/fs/Makefile.in
@@ -66,6 +66,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-blkdev-get-by-path.m4 \
$(top_srcdir)/config/kernel-blkdev-get.m4 \
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
+ $(top_srcdir)/config/kernel-clear-inode.m4 \
$(top_srcdir)/config/kernel-create-umode-t.m4 \
$(top_srcdir)/config/kernel-d-make-root.m4 \
$(top_srcdir)/config/kernel-d-obtain-alias.m4 \
diff --git a/include/sys/fs/Makefile.in b/include/sys/fs/Makefile.in
index 137f73e24..c1bff97bb 100644
--- a/include/sys/fs/Makefile.in
+++ b/include/sys/fs/Makefile.in
@@ -66,6 +66,7 @@ am__aclocal_m4_deps = \
$(top_srcdir)/config/kernel-blkdev-get-by-path.m4 \
$(top_srcdir)/config/kernel-blkdev-get.m4 \
$(top_srcdir)/config/kernel-check-disk-size-change.m4 \
+ $(top_srcdir)/config/kernel-clear-inode.m4 \
$(top_srcdir)/config/kernel-create-umode-t.m4 \
$(top_srcdir)/config/kernel-d-make-root.m4 \
$(top_srcdir)/config/kernel-d-obtain-alias.m4 \