aboutsummaryrefslogtreecommitdiff
path: root/sysutils/fusefs-kmod
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2009-05-27 16:25:38 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2009-05-27 16:25:38 +0000
commitf283803de695d5f8064cfa2ccca79d586aced8d0 (patch)
treedabcce43bb013dde3de14c576121b56bb207f113 /sysutils/fusefs-kmod
parent05a218b49a000d9fd863949df74a5f286dca2e95 (diff)
downloadports-f283803de695d5f8064cfa2ccca79d586aced8d0.tar.gz
ports-f283803de695d5f8064cfa2ccca79d586aced8d0.zip
Notes
Diffstat (limited to 'sysutils/fusefs-kmod')
-rw-r--r--sysutils/fusefs-kmod/files/patch-fuse_module__fuse.h14
-rw-r--r--sysutils/fusefs-kmod/files/patch-fuse_module__fuse_vfsops.c103
2 files changed, 112 insertions, 5 deletions
diff --git a/sysutils/fusefs-kmod/files/patch-fuse_module__fuse.h b/sysutils/fusefs-kmod/files/patch-fuse_module__fuse.h
index 8b35092a1783..5cc04a647a96 100644
--- a/sysutils/fusefs-kmod/files/patch-fuse_module__fuse.h
+++ b/sysutils/fusefs-kmod/files/patch-fuse_module__fuse.h
@@ -1,9 +1,17 @@
--- fuse_module/fuse.h.orig 2008-02-05 00:25:57.000000000 -0500
-+++ fuse_module/fuse.h 2008-10-29 19:18:43.000000000 -0400
-@@ -25,6 +25,14 @@
++++ fuse_module/fuse.h 2009-05-13 18:40:19.000000000 -0400
+@@ -25,6 +25,22 @@
#endif
#endif
++#ifndef VFSOPS_TAKES_THREAD
++#if __FreeBSD_version >= 800087
++#define VFSOPS_TAKES_THREAD 0
++#else
++#define VFSOPS_TAKES_THREAD 1
++#endif
++#endif
++
+#ifndef VOP_ACCESS_TAKES_ACCMODE_T
+#if __FreeBSD_version >= 800052
+#define VOP_ACCESS_TAKES_ACCMODE_T 1
@@ -15,7 +23,7 @@
#ifndef VOP_OPEN_TAKES_FP
#if __FreeBSD_version >= 700044
#define VOP_OPEN_TAKES_FP 1
-@@ -49,6 +57,14 @@
+@@ -49,6 +65,14 @@
#endif
#endif
diff --git a/sysutils/fusefs-kmod/files/patch-fuse_module__fuse_vfsops.c b/sysutils/fusefs-kmod/files/patch-fuse_module__fuse_vfsops.c
index 783cde9cd354..8db4eace2b94 100644
--- a/sysutils/fusefs-kmod/files/patch-fuse_module__fuse_vfsops.c
+++ b/sysutils/fusefs-kmod/files/patch-fuse_module__fuse_vfsops.c
@@ -1,5 +1,5 @@
--- fuse_module/fuse_vfsops.c.orig 2008-02-05 00:25:57.000000000 -0500
-+++ fuse_module/fuse_vfsops.c 2008-09-26 12:53:33.000000000 -0400
++++ fuse_module/fuse_vfsops.c 2009-05-13 18:54:01.000000000 -0400
@@ -18,6 +18,7 @@
#include <sys/namei.h>
#include <sys/mount.h>
@@ -8,7 +8,65 @@
#include "fuse.h"
#include "fuse_session.h"
-@@ -667,7 +668,11 @@
+@@ -213,8 +214,14 @@
+ * Mount system call
+ */
+ static int
++#if VFSOPS_TAKES_THREAD
+ fuse_mount(struct mount *mp, struct thread *td)
+ {
++#else
++fuse_mount(struct mount *mp)
++{
++ struct thread *td = curthread;
++#endif
+ int err = 0;
+ size_t len;
+ char *fspec, *subtype = NULL;
+@@ -529,8 +536,14 @@
+ * Unmount system call
+ */
+ static int
++#if VFSOPS_TAKES_THREAD
+ fuse_unmount(struct mount *mp, int mntflags, struct thread *td)
+ {
++#else
++fuse_unmount(struct mount *mp, int mntflags)
++{
++ struct thread *td = curthread;
++#endif
+ int flags = 0, err = 0;
+ struct fuse_data *data;
+ struct fuse_secondary_data *fsdat = NULL;
+@@ -633,8 +646,14 @@
+
+ /* stolen from portalfs */
+ static int
++#if VFSOPS_TAKES_THREAD
+ fuse_root(struct mount *mp, int flags, struct vnode **vpp, struct thread *td)
+ {
++#else
++fuse_root(struct mount *mp, int flags, struct vnode **vpp)
++{
++ struct thread *td = curthread;
++#endif
+ /*
+ * Return locked reference to root.
+ */
+@@ -650,7 +669,11 @@
+ data = fsdat->master;
+ sx_slock(&data->mhierlock);
+ if (data->mpri == FM_PRIMARY)
+- err = fuse_root(data->mp, flags, vpp, td);
++ err = fuse_root(data->mp, flags, vpp
++#if VFSOPS_TAKES_THREAD
++ , td
++#endif
++ );
+ else
+ err = ENXIO;
+ sx_sunlock(&data->mhierlock);
+@@ -667,7 +690,11 @@
if (vp->v_type == VNON) {
struct vattr va;
@@ -21,3 +79,44 @@
}
*vpp = vp;
#if _DEBUG2G
+@@ -678,8 +705,14 @@
+ }
+
+ static int
++#if VFSOPS_TAKES_THREAD
+ fuse_statfs(struct mount *mp, struct statfs *sbp, struct thread *td)
+ {
++#else
++fuse_statfs(struct mount *mp, struct statfs *sbp)
++{
++ struct thread *td = curthread;
++#endif
+ struct fuse_dispatcher fdi;
+ struct fuse_statfs_out *fsfo;
+ struct fuse_data *data;
+@@ -696,7 +729,11 @@
+
+ sx_slock(&data->mhierlock);
+ if (data->mpri == FM_PRIMARY)
+- err = fuse_statfs(data->mp, sbp, td);
++ err = fuse_statfs(data->mp, sbp
++#if VFSOPS_TAKES_THREAD
++ , td
++#endif
++ );
+ else
+ err = ENXIO;
+ sx_sunlock(&data->mhierlock);
+@@ -794,7 +831,11 @@
+ if (nodeid == FUSE_ROOT_ID) {
+ if (parentid != FUSE_NULL_ID)
+ return (ENOENT);
+- err = VFS_ROOT(mp, myflags, vpp, td);
++ err = VFS_ROOT(mp, myflags, vpp
++#if VFSOPS_TAKES_THREAD
++ , td
++#endif
++ );
+ if (err)
+ return (err);
+ KASSERT(*vpp, ("we neither err'd nor found the root node"));