]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
linux: provide read and write ops even when we have aio
authorDerrick Brashear <shadow@your-file-system.com>
Thu, 12 Sep 2013 12:09:34 +0000 (08:09 -0400)
committerStephan Wiesand <stephan.wiesand@desy.de>
Fri, 4 Oct 2013 09:34:30 +0000 (02:34 -0700)
read/write will fall back to aio ops but e.g. writev will
fail if there is not either a write or writev op explicitly.

force the fallback via do_sync_read/do_sync_write

required with 2.6.18-348.x rhel kernels but probably not newer ones

Reviewed-on: http://gerrit.openafs.org/10246
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit e6af2ffc86af17c4be427384467c4122fc5301b3)

Reviewed-on: http://gerrit.openafs.org/10248
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Jason Edgecombe <jason@rampaginggeek.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit ae8c311e207712e87421967749c79250a89d27ff)

Change-Id: I1062a768c5a4e48a054ce0b86cba893f77d5eaf1
Reviewed-on: http://gerrit.openafs.org/10277
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
acinclude.m4
src/afs/LINUX/osi_vnodeops.c

index 71a916a07c0549225c308940f0c6fe9b7ece2143..910d9104b7f4ddd17f8e6ef19c85ae26106eacc3 100644 (file)
@@ -820,6 +820,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
                 AC_CHECK_LINUX_STRUCT([cred], [session_keyring], [cred.h])
                 AC_CHECK_LINUX_STRUCT([ctl_table], [ctl_name], [sysctl.h])
                 AC_CHECK_LINUX_STRUCT([dentry_operations], [d_automount], [dcache.h])
+                AC_CHECK_LINUX_STRUCT([file_operations], [writev], [fs.h])
                 AC_CHECK_LINUX_STRUCT([inode], [i_alloc_sem], [fs.h])
                 AC_CHECK_LINUX_STRUCT([inode], [i_blkbits], [fs.h])
                 AC_CHECK_LINUX_STRUCT([inode], [i_blksize], [fs.h])
index 2154e6d4035d9556afe24184e26aada68860c3ef..2d5a08d1a07ae33e479c2e4e9e4a8091bc8fc8ba 100644 (file)
@@ -779,6 +779,10 @@ struct file_operations afs_file_fops = {
 #ifdef HAVE_LINUX_GENERIC_FILE_AIO_READ
   .aio_read =  afs_linux_aio_read,
   .aio_write = afs_linux_aio_write,
+#ifdef STRUCT_FILE_OPERATIONS_HAS_WRITEV
+  .read =      do_sync_read,
+  .write =     do_sync_write,
+#endif
 #else
   .read =      afs_linux_read,
   .write =     afs_linux_write,