In newer linux kernel version the file read/write
API have been moving to using struct iov_iter. To
continue supporting the old API new wrapper
functions were created, new_sync_*, which allowed
the use of the new API's to support the old API's.
For the linux 4.1 kernel those new_sync_* are used
internally so they are no longer exposed to any
file systems. If a file system wants to use the
"old" api they need to call vfs_[write|read].
Update lustre to handle this change. The upstream
commit that made new_sync_* internal was:
Linux commit:
5d5d568975307877e9195f5305f4240e506a2807
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Change-Id: Ibf69d25af8a7d5cda00c5b1be4757ec369e8e814
Reviewed-on: http://review.whamcloud.com/15165
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
+# LC_HAVE_SYNC_READ_WRITE
+#
+# 4.1 new_sync_[read|write] no longer exported
+#
+AC_DEFUN([LC_HAVE_SYNC_READ_WRITE], [
+LB_CHECK_EXPORT([new_sync_read], [fs/read_write.c],
+ [AC_DEFINE(HAVE_SYNC_READ_WRITE, 1,
+ [new_sync_[read|write] is exported by the kernel])])
+]) # LC_HAVE_SYNC_READ_WRITE
+
+#
# LC_PROG_LINUX
#
# Lustre linux kernel checks
# LC_PROG_LINUX
#
# Lustre linux kernel checks
+ LC_HAVE_SYNC_READ_WRITE
#
AS_IF([test "x$enable_server" != xno], [
#
AS_IF([test "x$enable_server" != xno], [
/* -o localflock - only provides locally consistent flock locks */
struct file_operations ll_file_operations = {
#ifdef HAVE_FILE_OPERATIONS_READ_WRITE_ITER
/* -o localflock - only provides locally consistent flock locks */
struct file_operations ll_file_operations = {
#ifdef HAVE_FILE_OPERATIONS_READ_WRITE_ITER
+# ifdef HAVE_SYNC_READ_WRITE
- .read_iter = ll_file_read_iter,
+# endif
+ .read_iter = ll_file_read_iter,
.write_iter = ll_file_write_iter,
#else /* !HAVE_FILE_OPERATIONS_READ_WRITE_ITER */
.read = ll_file_read,
.write_iter = ll_file_write_iter,
#else /* !HAVE_FILE_OPERATIONS_READ_WRITE_ITER */
.read = ll_file_read,
struct file_operations ll_file_operations_flock = {
#ifdef HAVE_FILE_OPERATIONS_READ_WRITE_ITER
struct file_operations ll_file_operations_flock = {
#ifdef HAVE_FILE_OPERATIONS_READ_WRITE_ITER
+# ifdef HAVE_SYNC_READ_WRITE
- .read_iter = ll_file_read_iter,
+# endif /* HAVE_SYNC_READ_WRITE */
+ .read_iter = ll_file_read_iter,
.write_iter = ll_file_write_iter,
#else /* !HAVE_FILE_OPERATIONS_READ_WRITE_ITER */
.read = ll_file_read,
.write_iter = ll_file_write_iter,
#else /* !HAVE_FILE_OPERATIONS_READ_WRITE_ITER */
.read = ll_file_read,
/* These are for -o noflock - to return ENOSYS on flock calls */
struct file_operations ll_file_operations_noflock = {
#ifdef HAVE_FILE_OPERATIONS_READ_WRITE_ITER
/* These are for -o noflock - to return ENOSYS on flock calls */
struct file_operations ll_file_operations_noflock = {
#ifdef HAVE_FILE_OPERATIONS_READ_WRITE_ITER
+# ifdef HAVE_SYNC_READ_WRITE
- .read_iter = ll_file_read_iter,
+# endif /* HAVE_SYNC_READ_WRITE */
+ .read_iter = ll_file_read_iter,
.write_iter = ll_file_write_iter,
#else /* !HAVE_FILE_OPERATIONS_READ_WRITE_ITER */
.read = ll_file_read,
.write_iter = ll_file_write_iter,
#else /* !HAVE_FILE_OPERATIONS_READ_WRITE_ITER */
.read = ll_file_read,