source: server/common/patches/openafs-splice.patch @ 816

Last change on this file since 816 was 510, checked in by andersk, 17 years ago
Implement splice_write and splice_read so that sendfile() works on kernel 2.6.23. (Submitted upstream.)
File size: 2.3 KB
  • acinclude.m4

    old new  
    614614                 LINUX_AOP_WRITEBACK_CONTROL
    615615                 LINUX_FS_STRUCT_FOP_HAS_FLOCK
    616616                 LINUX_FS_STRUCT_FOP_HAS_SENDFILE
     617                 LINUX_FS_STRUCT_FOP_HAS_SPLICE
    617618                 LINUX_KERNEL_LINUX_SYSCALL_H
    618619                 LINUX_KERNEL_LINUX_SEQ_FILE_H
    619620                 LINUX_KERNEL_POSIX_LOCK_FILE_WAIT_ARG
     
    861862                 if test "x$ac_cv_linux_fs_struct_fop_has_sendfile" = "xyes" ; then
    862863                  AC_DEFINE(STRUCT_FILE_OPERATIONS_HAS_SENDFILE, 1, [define if your struct file_operations has sendfile])
    863864                 fi
     865                 if test "x$ac_cv_linux_fs_struct_fop_has_splice" = "xyes" ; then
     866                  AC_DEFINE(STRUCT_FILE_OPERATIONS_HAS_SPLICE, 1, [define if your struct file_operations has splice_write and splice_read])
     867                 fi
    864868                 if test "x$ac_cv_linux_register_sysctl_table_noflag" = "xyes" ; then
    865869                  AC_DEFINE(REGISTER_SYSCTL_TABLE_NOFLAG, 1, [define if register_sysctl_table has no insert_at head flag])
    866870                 fi
  • src/afs/LINUX/osi_vnodeops.c

    old new  
    643643#if defined(AFS_LINUX26_ENV) && defined(STRUCT_FILE_OPERATIONS_HAS_SENDFILE)
    644644  .sendfile =   generic_file_sendfile,
    645645#endif
     646#if defined(AFS_LINUX26_ENV) && defined(STRUCT_FILE_OPERATIONS_HAS_SPLICE)
     647  .splice_write = generic_file_splice_write,
     648  .splice_read = generic_file_splice_read,
     649#endif
    646650  .release =    afs_linux_release,
    647651  .fsync =      afs_linux_fsync,
    648652  .lock =       afs_linux_lock,
  • src/cf/linux-test4.m4

    old new  
    894894      ac_cv_linux_fs_struct_fop_has_sendfile=no)])
    895895  AC_MSG_RESULT($ac_cv_linux_fs_struct_fop_has_sendfile)])
    896896
     897AC_DEFUN([LINUX_FS_STRUCT_FOP_HAS_SPLICE], [
     898  AC_MSG_CHECKING([for splice_write and splice_read in struct file_operations])
     899  AC_CACHE_VAL([ac_cv_linux_fs_struct_fop_has_splice], [
     900    AC_TRY_KBUILD(
     901[#include <linux/fs.h>],
     902[struct file_operations _fop;
     903_fop.splice_write(NULL, NULL, NULL, 0, 0);
     904_fop.splice_read(NULL, NULL, NULL, 0, 0);],
     905      ac_cv_linux_fs_struct_fop_has_splice=yes,
     906      ac_cv_linux_fs_struct_fop_has_splice=no)])
     907  AC_MSG_RESULT($ac_cv_linux_fs_struct_fop_has_splice)])
     908
Note: See TracBrowser for help on using the repository browser.