diff options
-rw-r--r-- | net-fs/openafs-kernel/Manifest | 23 | ||||
-rw-r--r-- | net-fs/openafs-kernel/files/oafs.patch | 411 | ||||
-rw-r--r-- | net-fs/openafs-kernel/openafs-kernel-1.4.12.1.ebuild | 1 |
3 files changed, 414 insertions, 21 deletions
diff --git a/net-fs/openafs-kernel/Manifest b/net-fs/openafs-kernel/Manifest index 542ebd8..d5d5b94 100644 --- a/net-fs/openafs-kernel/Manifest +++ b/net-fs/openafs-kernel/Manifest @@ -1,25 +1,6 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - -DIST openafs-1.4.10-src.tar.bz2 11553396 RMD160 f35416d1d9814a8ae9fb308429cdfe2218ba5700 SHA1 760f1d294b4d6145dd8792d7c58ada35fa34469f SHA256 9add117f0a120a02706578229bad7224f2ef1bad934712a0e7f89e09b1f1f660 -DIST openafs-1.4.11-src.tar.bz2 11556938 RMD160 e9b4d67a8ccd331745441f643863fa196f8f9220 SHA1 932c7830b747e944edd558f3dbac5636e367beb0 SHA256 acaaca5919a21e2c6b2ba666e7bcb07dc511a6611b80e378fc9e7699ec5dd6f3 +AUX oafs.patch 14546 RMD160 f44f86de3f1ba384131ab89c0f9c5a2c57bf5086 SHA1 bd581ce2a814a6b23585202bc14162fa05e0286f SHA256 925002469c4770baa30da8df80b57323bf533861304b820e7309c96a73f417f6 DIST openafs-1.4.12.1-patches-1.tar.bz2 12246 RMD160 4770a1957bf400c640426f17728cc64385478c51 SHA1 3d476099bd7357b30ccfebc067b61c7819df6bf0 SHA256 1d119bfe06e196cae18b2765b23066e9c96d8ef773f3a1a36616e70a546a33c8 DIST openafs-1.4.12.1-src.tar.bz2 11797335 RMD160 5c0d370a52faa2f7787b9c321cbfe733ae212be1 SHA1 b91a4d6213af1b31311b089a85e729b52980c18b SHA256 2335542deba8e1c1751d0586f88adf7fdc642305241c0ebb896f4d264dd6298e -DIST openafs-1.4.9-src.tar.bz2 11537589 RMD160 f5652e5576fd67a058dece1eff7481f7a9ced080 SHA1 b1816b45f09a8009a1fa19860c27aa7abdf5ee4d SHA256 e190a1b22d23cb549aa61b7dcdf2e19b1b3904c1d9a286749aca18660bc200de -DIST openafs-1.5.34-src.tar.bz2 12151866 RMD160 188f79e90de1eaa8457f2c5612cb2512a2e996e5 SHA1 11d9526b46395397a15ea83654584aaf61c7e594 SHA256 015f448bbc05e2b774858a6adfad1a37ce4d4aa402c6f63325c638d0153912b9 -DIST openafs-gentoo-0.14.tar.bz2 18293 RMD160 2a7ed8a40395d402de2f972fe0f96154d811e2b6 SHA1 dbff67178e7eae1bdbd5af43f6bedaeb747bd25a SHA256 e27918d395d656659b6f0d288d8a4d2501bd4ca6582824b8f3bbd420b06e6f6c -DIST openafs-gentoo-0.16.tar.bz2 24178 RMD160 9f201fe21b5a2f12ba2506a3e6c124a7a31c3218 SHA1 d07783ae13dfe258bb0e80cecf85c643f83ab210 SHA256 28a7f49c794a3d98054b0736ca33413fc731ecb4ec54507f8322365493031c96 -EBUILD openafs-kernel-1.4.10.ebuild 1743 RMD160 7b65349ca5da897a8c769a9b6f12d49d7d2c4e35 SHA1 a162891f05a0a556d9746ad09838761d0755b5cd SHA256 91c906ff34ea7c153dc77500d4f791eede7d525a5d67d1817b6966f89f806384 -EBUILD openafs-kernel-1.4.11.ebuild 1743 RMD160 0f5aa21607e01a3b273823072e0bb3b9046899c5 SHA1 bec20b469675988d79c01d7e183c89d6b7e19421 SHA256 abe05d69ee6d7dbec58e217ba6d83a30403f6a8d35fad37a0639831e1282b0e9 -EBUILD openafs-kernel-1.4.12.1.ebuild 1699 RMD160 6c64ba2587f6276a05c979c30aaa1cb37080fafc SHA1 909b9563a54c644326648b9c1ba85a08e9b251f7 SHA256 b27b0de0da22a772c317066709ff544f743f7af06582b48601c99f80ec6702ab -EBUILD openafs-kernel-1.4.9.ebuild 1713 RMD160 96a819cf098e661393cbd4e58c743b15c515e6cc SHA1 c5fb7bdf3f817e53a589d0d171361e7688fe6685 SHA256 dccd703a148123c28ab105f4d7ec78dfea57aa1f3d626bd86defe7e04c413eed -EBUILD openafs-kernel-1.5.34.ebuild 1485 RMD160 e70ec6393e61b11008eb430be24b9dbba86809e0 SHA1 d2dc981ac41479ae02de1cc4e3c41524a1893ca0 SHA256 0b82a50679d5fa2a32b4809d2c3753f7f752cdb189b51abdb1f291100f6ff1a0 +EBUILD openafs-kernel-1.4.12.1.ebuild 1737 RMD160 8b376b1d990e947e0b582647040f214220d521eb SHA1 9d38bbbc64e860a1904b343d3b9a1e71865d7562 SHA256 205b7c2868568fc90f8735dcb26e953e973c2d27895acee0c9232343431add91 MISC ChangeLog 20393 RMD160 151f8d815e511185c60aa0c3f32118094a586c4c SHA1 552c12b733c1baac3db862fa680aeb5b641e8a5f SHA256 e4a0a6317850c57d2382ce739f02b2cfcbb830efbf16a570d86338a65ca11703 MISC metadata.xml 350 RMD160 e22971d6336ba72dd8777fcfc29ad094f3d7d707 SHA1 0c88dffe968486c6e4f724f44b85ee52eb6ce63a SHA256 e517027bb98e3b25b32afec2ce53761f1ae82f29ffb8e03b488ddbe691d0644e ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.15 (GNU/Linux) - -iEYEARECAAYFAkwiUUUACgkQCRZPokWLroR8VwCfQFuFYYe6EG9axKqj1CGpY65M -t0QAn0CEbv2BlLAxT+0rTCUrjDwfLTXY -=4DzB ------END PGP SIGNATURE----- diff --git a/net-fs/openafs-kernel/files/oafs.patch b/net-fs/openafs-kernel/files/oafs.patch new file mode 100644 index 0000000..835de63 --- /dev/null +++ b/net-fs/openafs-kernel/files/oafs.patch @@ -0,0 +1,411 @@ +commit b8b708fc416aa281fe1d1ce1d498cc381c81679c +Author: Marc Dionne <marc.c.dionne@gmail.com> +Date: Wed Aug 11 19:28:53 2010 -0400 + + Linux: Rework statfs super block operations configure test + + The configure test to detect if the statfs super block operation + needs a dentry argument is based on vfs_statfs, and assumes that + its signature matches the one of the operation. In 2.6.36 this is + no longer true and the test fails. + + Rework the test to actually test the operation we're interested in. + + This change is required for 2.6.36. + + Reviewed-on: http://gerrit.openafs.org/2545 + Reviewed-by: Derrick Brashear <shadow@dementia.org> + Tested-by: Derrick Brashear <shadow@dementia.org> + + (cherry-picked from commit 08552ad8a94f7cc5908aabe8385711e09a6418e4) + + Change-Id: Ia690ea9de03790a8f576f99249fad8a7a7ba8bad + Reviewed-on: http://gerrit.openafs.org/2553 + Reviewed-by: Derrick Brashear <shadow@dementia.org> + Tested-by: Derrick Brashear <shadow@dementia.org> + +diff --git a/src/cf/linux-test4.m4 b/src/cf/linux-test4.m4 +index 66b21e3..5eabaa9 100644 +--- a/src/cf/linux-test4.m4 ++++ b/src/cf/linux-test4.m4 +@@ -734,9 +734,10 @@ AC_DEFUN([LINUX_STATFS_TAKES_DENTRY], [ + AC_TRY_KBUILD( + [#include <linux/fs.h> + #include <linux/statfs.h>], +-[ +-extern int vfs_statfs(struct dentry *, struct kstatfs *); +-], ++[struct super_block _sb; ++struct dentry _dentry; ++struct kstatfs _kstatfs; ++(void)_sb.s_op->statfs(&_dentry, &_kstatfs);], + ac_cv_linux_statfs_takes_dentry=yes, + ac_cv_linux_statfs_takes_dentry=no)]) + AC_MSG_RESULT($ac_cv_linux_statfs_takes_dentry)]) + +commit e05b5937201ec313d2c8fa863f4dacec87ab687d +Author: Marc Dionne <marc.c.dionne@gmail.com> +Date: Wed Aug 11 18:55:29 2010 -0400 + + Linux: switch to evict_inode + + In 2.6.36, the delete_inode and clear_inode inode operations + are replaced by evict_inode. + Rename our current clear_inode to evict_inode, and add a few + things that were previously handled by the generic delete_inode. + + This is required for 2.6.36. + + Reviewed-on: http://gerrit.openafs.org/2544 + Reviewed-by: Derrick Brashear <shadow@dementia.org> + Tested-by: Derrick Brashear <shadow@dementia.org> + + (cherry-picked from commit fb01fbd7cd2d396df8a4605eaad9febc52ef3b61) + + Change-Id: I7ad09be8183d2503e89f7f64a1208b1dbb5fef9e + Reviewed-on: http://gerrit.openafs.org/2552 + Reviewed-by: Derrick Brashear <shadow@dementia.org> + Tested-by: Derrick Brashear <shadow@dementia.org> + +diff --git a/acinclude.m4 b/acinclude.m4 +index bbbe938..f94205a 100644 +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -757,6 +757,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*) + LINUX_DEFINES_FOR_EACH_PROCESS + LINUX_DEFINES_PREV_TASK + LINUX_FS_STRUCT_SUPER_HAS_ALLOC_INODE ++ LINUX_FS_STRUCT_SUPER_HAS_EVICT_INODE + LINUX_FS_STRUCT_SUPER_BLOCK_HAS_S_BDI + LINUX_STRUCT_BDI_HAS_NAME + LINUX_FS_STRUCT_ADDRESS_SPACE_HAS_PAGE_LOCK +@@ -922,6 +923,9 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*) + if test "x$ac_cv_linux_fs_struct_super_has_alloc_inode" = "xyes" ; then + AC_DEFINE(STRUCT_SUPER_HAS_ALLOC_INODE, 1, [define if your struct super_operations has alloc_inode]) + fi ++ if test "x$ac_cv_linux_fs_struct_super_has_evict_inode" = "xyes" ; then ++ AC_DEFINE(STRUCT_SUPER_OPERATIONS_HAS_EVICT_INODE, 1, [define if your struct super_operations has evict_inode]) ++ fi + if test "x$ac_cv_linux_fs_struct_address_space_has_page_lock" = "xyes"; then + AC_DEFINE(STRUCT_ADDRESS_SPACE_HAS_PAGE_LOCK, 1, [define if your struct address_space has page_lock]) + fi +diff --git a/src/afs/LINUX/osi_vfsops.c b/src/afs/LINUX/osi_vfsops.c +index 49bfbee..e46c3eb 100644 +--- a/src/afs/LINUX/osi_vfsops.c ++++ b/src/afs/LINUX/osi_vfsops.c +@@ -342,6 +342,25 @@ afs_destroy_inodecache(void) + } + #endif + ++#if defined(STRUCT_SUPER_OPERATIONS_HAS_EVICT_INODE) ++static void ++afs_evict_inode(struct inode *ip) ++{ ++ struct vcache *vcp = VTOAFS(ip); ++ ++ if (vcp->vlruq.prev || vcp->vlruq.next) ++ osi_Panic("inode freed while on LRU"); ++ if (vcp->hnext) ++ osi_Panic("inode freed while still hashed"); ++ ++ truncate_inode_pages(&ip->i_data, 0); ++ end_writeback(ip); ++ ++#if !defined(STRUCT_SUPER_HAS_ALLOC_INODE) ++ afs_osi_Free(ip->u.generic_ip, sizeof(struct vcache)); ++#endif ++} ++#else + static void + afs_clear_inode(struct inode *ip) + { +@@ -356,6 +375,7 @@ afs_clear_inode(struct inode *ip) + afs_osi_Free(ip->u.generic_ip, sizeof(struct vcache)); + #endif + } ++#endif + + /* afs_put_super + * Called from unmount to release super_block. */ +@@ -456,7 +476,11 @@ struct super_operations afs_sops = { + .alloc_inode = afs_alloc_inode, + .destroy_inode = afs_destroy_inode, + #endif ++#if defined(STRUCT_SUPER_OPERATIONS_HAS_EVICT_INODE) ++ .evict_inode = afs_evict_inode, ++#else + .clear_inode = afs_clear_inode, ++#endif + .put_super = afs_put_super, + .statfs = afs_statfs, + #if !defined(AFS_LINUX24_ENV) +diff --git a/src/cf/linux-test4.m4 b/src/cf/linux-test4.m4 +index 5603b21..66b21e3 100644 +--- a/src/cf/linux-test4.m4 ++++ b/src/cf/linux-test4.m4 +@@ -467,6 +467,18 @@ printk("%p\n", _super.alloc_inode);], + AC_MSG_RESULT($ac_cv_linux_fs_struct_super_has_alloc_inode)]) + + ++AC_DEFUN([LINUX_FS_STRUCT_SUPER_HAS_EVICT_INODE], [ ++ AC_MSG_CHECKING([for evict_inode in struct super_operations]) ++ AC_CACHE_VAL([ac_cv_linux_fs_struct_super_has_evict_inode], [ ++ AC_TRY_KBUILD( ++[#include <linux/fs.h>], ++[struct super_operations _super; ++printk("%p\n", _super.evict_inode);], ++ ac_cv_linux_fs_struct_super_has_evict_inode=yes, ++ ac_cv_linux_fs_struct_super_has_evict_inode=no)]) ++ AC_MSG_RESULT($ac_cv_linux_fs_struct_super_has_evict_inode)]) ++ ++ + AC_DEFUN([LINUX_KERNEL_POSIX_LOCK_FILE_WAIT_ARG], [ + AC_MSG_CHECKING([for 3rd argument in posix_lock_file found in new kernels]) + AC_CACHE_VAL([ac_cv_linux_kernel_posix_lock_file_wait_arg], [ + +commit e2e8881db7757ccac5ce3d5fc5603c40c5b47a43 +Author: Marc Dionne <marc.c.dionne@gmail.com> +Date: Wed Aug 11 17:18:32 2010 -0400 + + Linux: use %pI4 if NIPQUAD is not available + + The definition of NIPQUAD has been removed from the kernel headers + in the mainline kernel. Replace it by using the %pI4 format + specifier which takes the IP address as a single argument. + + There should be no change in the output. + + This fix is required for 2.6.36. + + Reviewed-on: http://gerrit.openafs.org/2542 + Tested-by: Derrick Brashear <shadow@dementia.org> + Reviewed-by: Derrick Brashear <shadow@dementia.org> + + (cherry-picked from commit d4018b2673e6532543984838290ffb891b970fea) + + Change-Id: I49a4f55f71857c5a95df174bf017e27b5bcd0a95 + Reviewed-on: http://gerrit.openafs.org/2551 + Reviewed-by: Derrick Brashear <shadow@dementia.org> + Tested-by: Derrick Brashear <shadow@dementia.org> + +diff --git a/src/afs/LINUX/osi_module.c b/src/afs/LINUX/osi_module.c +index ed9be8a..de8da52 100644 +--- a/src/afs/LINUX/osi_module.c ++++ b/src/afs/LINUX/osi_module.c +@@ -134,8 +134,12 @@ static int c_show(struct seq_file *m, void *p) + if (!tc->cellHosts[j]) break; + + addr = tc->cellHosts[j]->addr->sa_ip; ++#if defined(NIPQUAD) + seq_printf(m, "%u.%u.%u.%u #%u.%u.%u.%u\n", + NIPQUAD(addr), NIPQUAD(addr)); ++#else ++ seq_printf(m, "%pI4 #%pI4\n", &addr, &addr); ++#endif + } + + return 0; + +commit 58e56d080b8d19117b60f04ecb37af0c6dcafc1a +Author: Marc Dionne <marc.c.dionne@gmail.com> +Date: Wed Aug 11 18:20:59 2010 -0400 + + Linux: adapt to truncate sequence changes + + As part of changes to the truncate sequence, inode_setattr() no + longer exists, and all filesystems have to define the setattr op + so we can assume that it is not NULL. + + Introduce a compat inline function afs_inode_setattr that hides + the tests and the different versions from the main code. + + Note that the existing test for the inode_setattr() return type + will fail, but the value is no longer used in that case. + + This is required for 2.6.36 + + Reviewed-on: http://gerrit.openafs.org/2543 + Reviewed-by: Derrick Brashear <shadow@dementia.org> + Tested-by: Derrick Brashear <shadow@dementia.org> + + (cherry-picked from commit eaf3378f537935f6b9843886b43d) + + Change-Id: I1261e1e67d54409276d8b3530f9ec4f879604733 + Reviewed-on: http://gerrit.openafs.org/2550 + Reviewed-by: Derrick Brashear <shadow@dementia.org> + Tested-by: Derrick Brashear <shadow@dementia.org> + +diff --git a/acinclude.m4 b/acinclude.m4 +index 984b7ff..bbbe938 100644 +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -828,6 +828,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*) + LINUX_STRUCT_CTL_TABLE_HAS_CTL_NAME + LINUX_HAVE_IGET + LINUX_HAVE_I_SIZE_READ ++ LINUX_HAVE_INODE_SETATTR + LINUX_FS_STRUCT_NAMEIDATA_HAS_PATH + LINUX_EXPORTS_INIT_MM + LINUX_EXPORTS_SYS_CHDIR +diff --git a/src/afs/LINUX/osi_compat.h b/src/afs/LINUX/osi_compat.h +index 54b985a..078c6c3 100644 +--- a/src/afs/LINUX/osi_compat.h ++++ b/src/afs/LINUX/osi_compat.h +@@ -119,3 +119,23 @@ init_once_func(void * foo) { + # endif + #endif + #endif ++ ++static inline int ++afs_inode_setattr(struct osi_file *afile, struct iattr *newattrs) { ++ ++ int code = 0; ++ struct inode *inode = OSIFILE_INODE(afile); ++#if !defined(HAVE_LINUX_INODE_SETATTR) ++ code = inode->i_op->setattr(afile->filp->f_dentry, newattrs); ++#elif defined(INODE_SETATTR_NOT_VOID) ++#if defined(AFS_LINUX26_ENV) ++ if (inode->i_op && inode->i_op->setattr) ++ code = inode->i_op->setattr(afile->filp->f_dentry, newattrs); ++ else ++#endif ++ code = inode_setattr(inode, newattrs); ++#else ++ inode_setattr(inode, newattrs); ++#endif ++ return code; ++} +diff --git a/src/afs/LINUX/osi_file.c b/src/afs/LINUX/osi_file.c +index 1f9e8cf..1fc583b 100644 +--- a/src/afs/LINUX/osi_file.c ++++ b/src/afs/LINUX/osi_file.c +@@ -21,6 +21,7 @@ + #if !defined(HAVE_IGET) + #include "h/exportfs.h" + #endif ++#include "osi_compat.h" + + int afs_osicred_initialized = 0; + struct AFS_UCRED afs_osi_cred; +@@ -237,17 +238,7 @@ osi_UFSTruncate(register struct osi_file *afile, afs_int32 asize) + lock_kernel(); + code = inode_change_ok(inode, &newattrs); + if (!code) +-#ifdef INODE_SETATTR_NOT_VOID +-#if defined(AFS_LINUX26_ENV) +- if (inode->i_op && inode->i_op->setattr) +- code = inode->i_op->setattr(afile->filp->f_dentry, &newattrs); +- else +-#endif +- code = inode_setattr(inode, &newattrs); +-#else +- inode_setattr(inode, &newattrs); +-#endif +- unlock_kernel(); ++ code = afs_inode_setattr(afile, &newattrs); + if (!code) + truncate_inode_pages(&inode->i_data, asize); + #else +diff --git a/src/cf/linux-test4.m4 b/src/cf/linux-test4.m4 +index 3e200b0..5603b21 100644 +--- a/src/cf/linux-test4.m4 ++++ b/src/cf/linux-test4.m4 +@@ -1278,3 +1278,19 @@ _bdi.name = NULL;], + if test "x$ac_cv_linux_struct_bdi_has_name" = "xyes"; then + AC_DEFINE([STRUCT_BDI_HAS_NAME], 1, [define if struct backing_dev_info has a name member]) + fi]) ++ ++AC_DEFUN([LINUX_HAVE_INODE_SETATTR], [ ++ AC_MSG_CHECKING([for linux inode_setattr()]) ++ AC_CACHE_VAL([ac_cv_linux_inode_setattr], [ ++ save_CPPFLAGS="$CPPFLAGS" ++ CPPFLAGS="$CPPFLAGS -Werror-implicit-function-declaration" ++ AC_TRY_KBUILD( ++[#include <linux/fs.h>], ++[inode_setattr(NULL);], ++ ac_cv_linux_inode_setattr=yes, ++ ac_cv_linux_inode_setattr=no) ++ CPPFLAGS="$save_CPPFLAGS"]) ++ AC_MSG_RESULT($ac_cv_linux_inode_setattr) ++ if test "x$ac_cv_linux_inode_setattr" = "xyes"; then ++ AC_DEFINE([HAVE_LINUX_INODE_SETATTR], 1, [define if your kernel has inode_setattr()]) ++ fi]) + +commit 58bffd741cdc917f164f19b4621aa2567e6a5b3e +Author: Marc Dionne <marc.c.dionne@gmail.com> +Date: Fri May 28 17:48:12 2010 -0400 + + Linux: 2.6.35 - fsync no longer takes a dentry + + In 2.6.35, the fsync file operations drops the dentry argument. + Add a configure test and cope. + + Reviewed-on: http://gerrit.openafs.org/2064 + Reviewed-by: Derrick Brashear <shadow@dementia.org> + Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk> + Tested-by: Derrick Brashear <shadow@dementia.org> + + (cherry-picked from commit 4d89ce0a89e9b9e2709e6f6d730f245b5bce744b) + + Change-Id: Ifa1f6d2d3c7de03346ba509fab03040ef4f7f26e + Reviewed-on: http://gerrit.openafs.org/2549 + Reviewed-by: Derrick Brashear <shadow@dementia.org> + Tested-by: Derrick Brashear <shadow@dementia.org> + +diff --git a/acinclude.m4 b/acinclude.m4 +index d4a175c..984b7ff 100644 +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -781,6 +781,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*) + LINUX_IOP_I_PUT_LINK_TAKES_COOKIE + LINUX_DOP_D_REVALIDATE_TAKES_NAMEIDATA + LINUX_FOP_F_FLUSH_TAKES_FL_OWNER_T ++ LINUX_FOP_F_FSYNC_TAKES_DENTRY + LINUX_AOP_WRITEBACK_CONTROL + LINUX_FS_STRUCT_FOP_HAS_FLOCK + LINUX_FS_STRUCT_FOP_HAS_SENDFILE +diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c +index ceeba94..ebabc72 100644 +--- a/src/afs/LINUX/osi_vnodeops.c ++++ b/src/afs/LINUX/osi_vnodeops.c +@@ -447,8 +447,10 @@ afs_linux_release(struct inode *ip, struct file *fp) + } + + static int +-#if defined(AFS_LINUX24_ENV) ++#if defined(AFS_LINUX24_ENV) && defined(FOP_FSYNC_TAKES_DENTRY) + afs_linux_fsync(struct file *fp, struct dentry *dp, int datasync) ++#elif defined(AFS_LINUX24_ENV) ++afs_linux_fsync(struct file *fp, int datasync) + #else + afs_linux_fsync(struct file *fp, struct dentry *dp) + #endif +diff --git a/src/cf/linux-test4.m4 b/src/cf/linux-test4.m4 +index 2677f04..3e200b0 100644 +--- a/src/cf/linux-test4.m4 ++++ b/src/cf/linux-test4.m4 +@@ -929,6 +929,23 @@ fl_owner_t id; + ac_cv_linux_func_f_flush_takes_fl_owner_t=no)]) + AC_MSG_RESULT($ac_cv_linux_func_f_flush_takes_fl_owner_t)]) + ++AC_DEFUN([LINUX_FOP_F_FSYNC_TAKES_DENTRY], [ ++ AC_MSG_CHECKING([whether file_operations.fsync takes a dentry argument]) ++ AC_CACHE_VAL([ac_cv_linux_func_f_fsync_takes_dentry], [ ++ AC_TRY_KBUILD( ++[#include <linux/fs.h>], ++[struct inode _inode; ++struct file _file; ++struct dentry _d; ++(void)_inode.i_fop->fsync(&_file, &_d, 0);], ++ ac_cv_linux_func_f_fsync_takes_dentry=yes, ++ ac_cv_linux_func_f_fsync_takes_dentry=no)]) ++ AC_MSG_RESULT($ac_cv_linux_func_f_fsync_takes_dentry) ++ if test "x$ac_cv_linux_func_f_fsync_takes_dentry" = "xyes"; then ++ AC_DEFINE([FOP_FSYNC_TAKES_DENTRY], 1, [define if your fops.fsync takes an dentry argument]) ++ fi ++]) ++ + AC_DEFUN([LINUX_HAVE_KMEM_CACHE_T], [ + AC_MSG_CHECKING([whether kmem_cache_t exists]) + AC_CACHE_VAL([ac_cv_linux_have_kmem_cache_t], [ + diff --git a/net-fs/openafs-kernel/openafs-kernel-1.4.12.1.ebuild b/net-fs/openafs-kernel/openafs-kernel-1.4.12.1.ebuild index 3ddd7a5..5777ee6 100644 --- a/net-fs/openafs-kernel/openafs-kernel-1.4.12.1.ebuild +++ b/net-fs/openafs-kernel/openafs-kernel-1.4.12.1.ebuild @@ -35,6 +35,7 @@ src_prepare() { EPATCH_EXCLUDE="012_all_kbuild.patch" \ EPATCH_SUFFIX="patch" \ epatch "${WORKDIR}"/gentoo/patches + patch -p1 < "${FILESDIR}"/oafs.patch # packaging is f-ed up, so we can't run automake (i.e. eautoreconf) sed -i '/^a/s:^:e:' regen.sh |