summaryrefslogtreecommitdiff
path: root/sysutils/fusefs-kmod
diff options
context:
space:
mode:
Diffstat (limited to 'sysutils/fusefs-kmod')
-rw-r--r--sysutils/fusefs-kmod/Makefile6
-rw-r--r--sysutils/fusefs-kmod/files/extra-patch-8-fuse_vfsops.c47
-rw-r--r--sysutils/fusefs-kmod/files/extra-patch-8-fuse_vnops.c146
3 files changed, 1 insertions, 198 deletions
diff --git a/sysutils/fusefs-kmod/Makefile b/sysutils/fusefs-kmod/Makefile
index 2f33835791be..e5b502ba17ae 100644
--- a/sysutils/fusefs-kmod/Makefile
+++ b/sysutils/fusefs-kmod/Makefile
@@ -27,11 +27,7 @@ SUB_FILES= pkg-message
.include <bsd.port.pre.mk>
-.if ${OSVERSION} < 900000
-EXTRA_PATCHES+= ${FILESDIR}/extra-patch-8-fuse_vfsops.c
-EXTRA_PATCHES+= ${FILESDIR}/extra-patch-8-fuse_vnops.c
-.endif
-.if ${OSVERSION} >= 900000 && ${OSVERSION} < 1000000
+.if ${OSVERSION} < 1000000
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-9-fuse_main.c
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-9-fuse_vfsops.c
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-9-fuse_vnops.c
diff --git a/sysutils/fusefs-kmod/files/extra-patch-8-fuse_vfsops.c b/sysutils/fusefs-kmod/files/extra-patch-8-fuse_vfsops.c
deleted file mode 100644
index 2a5bb20d52ce..000000000000
--- a/sysutils/fusefs-kmod/files/extra-patch-8-fuse_vfsops.c
+++ /dev/null
@@ -1,47 +0,0 @@
---- fs/fuse/fuse_vfsops.c.orig
-+++ fs/fuse/fuse_vfsops.c
-@@ -62,8 +62,8 @@
- #include <sys/errno.h>
- #include <sys/param.h>
- #include <sys/kernel.h>
--#include <sys/capsicum.h>
- #include <sys/conf.h>
-+#include <sys/file.h>
- #include <sys/filedesc.h>
- #include <sys/uio.h>
- #include <sys/malloc.h>
-@@ -206,7 +206,7 @@
- {
- int err;
-
-- uint64_t mntopts, __mntopts;
-+ u_int mntopts, __mntopts;
- int max_read_set;
- uint32_t max_read;
- int daemon_timeout;
-@@ -220,7 +220,6 @@
- struct file *fp, *fptmp;
- char *fspec, *subtype;
- struct vfsoptlist *opts;
-- cap_rights_t rights;
-
- subtype = NULL;
- max_read_set = 0;
-@@ -290,7 +289,7 @@
-
- FS_DEBUG2G("mntopts 0x%jx\n", (uintmax_t)mntopts);
-
-- err = fget(td, fd, cap_rights_init(&rights, CAP_READ), &fp);
-+ err = fget(td, fd, &fp);
- if (err != 0) {
- FS_DEBUG("invalid or not opened device: data=%p\n", data);
- goto out;
-@@ -459,7 +458,7 @@
- FUSE_UNLOCK();
- VOP_UNLOCK(*vpp, 0);
- vrele(*vpp);
-- vrecycle(*vpp);
-+ vrecycle(*vpp, curthread);
- *vpp = data->vroot;
- } else
- FUSE_UNLOCK();
diff --git a/sysutils/fusefs-kmod/files/extra-patch-8-fuse_vnops.c b/sysutils/fusefs-kmod/files/extra-patch-8-fuse_vnops.c
deleted file mode 100644
index b18b8190e643..000000000000
--- a/sysutils/fusefs-kmod/files/extra-patch-8-fuse_vnops.c
+++ /dev/null
@@ -1,146 +0,0 @@
---- fs/fuse/fuse_vnops.c.orig
-+++ fs/fuse/fuse_vnops.c
-@@ -190,10 +190,10 @@
-
- int fuse_pbuf_freecnt = -1;
-
--#define fuse_vm_page_lock(m) vm_page_lock((m));
--#define fuse_vm_page_unlock(m) vm_page_unlock((m));
--#define fuse_vm_page_lock_queues() ((void)0)
--#define fuse_vm_page_unlock_queues() ((void)0)
-+#define fuse_vm_page_lock(m) ((void)0)
-+#define fuse_vm_page_unlock(m) ((void)0)
-+#define fuse_vm_page_lock_queues() vm_page_lock_queues()
-+#define fuse_vm_page_unlock_queues() vm_page_unlock_queues()
-
- /*
- struct vnop_access_args {
-@@ -579,7 +579,7 @@
- }
-
- if ((fvdat->flag & FN_REVOKED) != 0 && fuse_reclaim_revoked) {
-- vrecycle(vp);
-+ vrecycle(vp, curthread);
- }
- return 0;
- }
-@@ -706,7 +706,7 @@
- op = FUSE_GETATTR;
- goto calldaemon;
- } else if (fuse_lookup_cache_enable) {
-- err = cache_lookup(dvp, vpp, cnp, NULL, NULL);
-+ err = cache_lookup(dvp, vpp, cnp);
- switch (err) {
-
- case -1: /* positive match */
-@@ -1758,7 +1758,7 @@
- * can only occur at the file EOF.
- */
-
-- VM_OBJECT_WLOCK(vp->v_object);
-+ VM_OBJECT_LOCK(vp->v_object);
- fuse_vm_page_lock_queues();
- if (pages[ap->a_reqpage]->valid != 0) {
- for (i = 0; i < npages; ++i) {
-@@ -1769,11 +1769,11 @@
- }
- }
- fuse_vm_page_unlock_queues();
-- VM_OBJECT_WUNLOCK(vp->v_object);
-+ VM_OBJECT_UNLOCK(vp->v_object);
- return 0;
- }
- fuse_vm_page_unlock_queues();
-- VM_OBJECT_WUNLOCK(vp->v_object);
-+ VM_OBJECT_UNLOCK(vp->v_object);
-
- /*
- * We use only the kva address for the buffer, but this is extremely
-@@ -1803,7 +1803,7 @@
-
- if (error && (uio.uio_resid == count)) {
- FS_DEBUG("error %d\n", error);
-- VM_OBJECT_WLOCK(vp->v_object);
-+ VM_OBJECT_LOCK(vp->v_object);
- fuse_vm_page_lock_queues();
- for (i = 0; i < npages; ++i) {
- if (i != ap->a_reqpage) {
-@@ -1813,7 +1813,7 @@
- }
- }
- fuse_vm_page_unlock_queues();
-- VM_OBJECT_WUNLOCK(vp->v_object);
-+ VM_OBJECT_UNLOCK(vp->v_object);
- return VM_PAGER_ERROR;
- }
- /*
-@@ -1823,7 +1823,7 @@
- */
-
- size = count - uio.uio_resid;
-- VM_OBJECT_WLOCK(vp->v_object);
-+ VM_OBJECT_LOCK(vp->v_object);
- fuse_vm_page_lock_queues();
- for (i = 0, toff = 0; i < npages; i++, toff = nextoff) {
- vm_page_t m;
-@@ -1843,7 +1843,7 @@
- * Read operation filled a partial page.
- */
- m->valid = 0;
-- vm_page_set_valid_range(m, 0, size - toff);
-+ vm_page_set_valid(m, 0, size - toff);
- KASSERT(m->dirty == 0,
- ("fuse_getpages: page %p is dirty", m));
- } else {
-@@ -1854,11 +1854,36 @@
- */
- ;
- }
-- if (i != ap->a_reqpage)
-- vm_page_readahead_finish(m);
-+ if (i != ap->a_reqpage) {
-+ /*
-+ * whether or not to leave the page activated is up in
-+ * the air, but we should put the page on a page queue
-+ * somewhere. (it already is in the object). Result:
-+ * It appears that empirical results show that
-+ * deactivating pages is best.
-+ */
-+
-+ /*
-+ * just in case someone was asking for this page we
-+ * now tell them that it is ok to use
-+ */
-+ if (!error) {
-+#ifdef VPO_WANTED
-+ if (m->oflags & VPO_WANTED)
-+#else
-+ if (m->flags & PG_WANTED)
-+#endif
-+ vm_page_activate(m);
-+ else
-+ vm_page_deactivate(m);
-+ vm_page_wakeup(m);
-+ } else {
-+ vm_page_free(m);
-+ }
-+ }
- }
- fuse_vm_page_unlock_queues();
-- VM_OBJECT_WUNLOCK(vp->v_object);
-+ VM_OBJECT_UNLOCK(vp->v_object);
- return 0;
- }
-
-@@ -1947,9 +1972,9 @@
-
- for (i = 0; i < nwritten; i++) {
- rtvals[i] = VM_PAGER_OK;
-- VM_OBJECT_WLOCK(pages[i]->object);
-+ VM_OBJECT_LOCK(pages[i]->object);
- vm_page_undirty(pages[i]);
-- VM_OBJECT_WUNLOCK(pages[i]->object);
-+ VM_OBJECT_UNLOCK(pages[i]->object);
- }
- }
- return rtvals[0];