[Midnightbsd-cvs] mports [21000] trunk/sysutils/fusefs-kmod: update fuse kernel module

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Fri Feb 5 11:40:06 EST 2016


Revision: 21000
          http://svnweb.midnightbsd.org/mports/?rev=21000
Author:   laffer1
Date:     2016-02-05 11:40:05 -0500 (Fri, 05 Feb 2016)
Log Message:
-----------
update fuse kernel module

Modified Paths:
--------------
    trunk/sysutils/fusefs-kmod/Makefile
    trunk/sysutils/fusefs-kmod/distinfo
    trunk/sysutils/fusefs-kmod/files/fusefs.in
    trunk/sysutils/fusefs-kmod/files/pkg-message.in
    trunk/sysutils/fusefs-kmod/pkg-descr
    trunk/sysutils/fusefs-kmod/pkg-plist

Added Paths:
-----------
    trunk/sysutils/fusefs-kmod/files/extra-patch-9-fuse_main.c
    trunk/sysutils/fusefs-kmod/files/extra-patch-9-fuse_vfsops.c
    trunk/sysutils/fusefs-kmod/files/extra-patch-9-fuse_vnops.c
    trunk/sysutils/fusefs-kmod/files/patch-fuse_io.c
    trunk/sysutils/fusefs-kmod/files/patch-fuse_node.c

Removed Paths:
-------------
    trunk/sysutils/fusefs-kmod/files/extra-patch-fuse_module__fuse_vnops.c
    trunk/sysutils/fusefs-kmod/files/patch-fuse_module__Makefile
    trunk/sysutils/fusefs-kmod/files/patch-fuse_module__fuse.h
    trunk/sysutils/fusefs-kmod/files/patch-fuse_module__fuse_dev.c
    trunk/sysutils/fusefs-kmod/files/patch-fuse_module__fuse_io.c
    trunk/sysutils/fusefs-kmod/files/patch-fuse_module__fuse_main.c
    trunk/sysutils/fusefs-kmod/files/patch-fuse_module__fuse_vfsops.c
    trunk/sysutils/fusefs-kmod/files/patch-fuse_module__fuse_vnops.c
    trunk/sysutils/fusefs-kmod/files/patch-mount_fusefs__mount_fusefs.c
    trunk/sysutils/fusefs-kmod/files/setup.sh.in

Property Changed:
----------------
    trunk/sysutils/fusefs-kmod/files/fusefs.in
    trunk/sysutils/fusefs-kmod/files/pkg-message.in

Modified: trunk/sysutils/fusefs-kmod/Makefile
===================================================================
--- trunk/sysutils/fusefs-kmod/Makefile	2016-02-05 16:33:08 UTC (rev 20999)
+++ trunk/sysutils/fusefs-kmod/Makefile	2016-02-05 16:40:05 UTC (rev 21000)
@@ -1,114 +1,61 @@
-# $MidnightBSD$
+# $FreeBSD: head/sysutils/fusefs-kmod/Makefile 399346 2015-10-15 14:55:14Z mat $
 
-PORTNAME=	fusefs
-DISTVERSION=	0.3.9-pre1.20080208
-PORTREVISION=	2
-CATEGORIES=	sysutils kld
-MASTER_SITES=	http://mercurial.creo.hu/repos/fuse4bsd-hg/index.cgi/archive/ \
-		http://mirrors.rit.edu/zi/fuse4bsd/ \
-		FREEBSD_LOCAL/bdrewery/${PORTNAME}/
-PKGNAMESUFFIX=	-kmod
-DISTNAME=	${HG_SHORTREV}
-DIST_SUBDIR=	fuse4bsd
+PORTNAME=	fusefs-kmod
+PORTVERSION=	0.263233
+PORTEPOCH=	1
+CATEGORIES=	sysutils
+MASTER_SITES=	https://googledrive.com/host/0B0OQnKtejJEMQlpoTy11SG1nN2s/
 
 MAINTAINER=	ports at MidnightBSD.org
-COMMENT=	Kernel module for fuse
+COMMENT=	FUSE kernel module
+
 LICENSE=	bsd2
 
 BUILD_DEPENDS=	fusefs-libs>2.4.1:${PORTSDIR}/sysutils/fusefs-libs
 
-FAKE_OPTS=	trueprefix
+WRKSRC=		${WRKDIR}
 
 USE_RC_SUBR=	fusefs
-KMODDIR?=	${PREFIX}/modules
-PLIST_SUB=	KMODDIR=${KMODDIR}
-MAKE_ENV=	BINDIR="${PREFIX}/sbin" MANDIR="${MANPREFIX}/man/man" \
-		KMODDIR="${KMODDIR}" SYSDIR="${SRC_BASE}/sys" \
-		MOUNT="${SRC_BASE}/sbin/mount"
-WRKSRC=		${WRKDIR}/fuse4bsd-${HG_SHORTREV}
-DISABLE_SIZE=	yes
+USES=		kmod uidfix
 
-SRC_BASE?=	/usr/src
-SETUP=		setup.sh
-HG_SHORTREV=	498acaef33b0
+MAKE_ENV=	BINDIR="${PREFIX}/sbin" \
+		MANDIR="${MANPREFIX}/man/man"
 
-MAN8=		mount_fusefs.8
-TXT_DOCS=	doc.text
-HTML_DOCS=	Faq.html \
-		Implementation.html \
-		Quickstart.html \
-		article.css \
-		deplate-mini.png \
-		deplate.css \
-		doc.html \
-		heading-navbar.css \
-		home-grey.png \
-		mailto.png \
-		next-grey.png \
-		prev-grey.png \
-		remote.png \
-		serif.css \
-		tabbar-right.css
+SUB_LIST+=	KMODDIR=${KMODDIR}
+SUB_FILES=	pkg-message
 
-OPTIONS=	AUTOSETUP "Automatic global config file setup" off
+PREFIX=		${FAKE_DESTDIR}/
 
 .include <bsd.port.pre.mk>
 
-.if ${OSVERSION} >= 4016
-EXTRA_PATCHES+= ${FILESDIR}/extra-patch-fuse_module__fuse_vnops.c
-.endif
+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
 
-.if !exists(${SRC_BASE}/sys/Makefile)
-IGNORE=		requires the Kernel source to be installed. Set SRC_BASE if it is not in /usr/src
-.endif
-.if !exists(${SRC_BASE}/sbin/mount)
-IGNORE=		requires the userland sources to be installed. Set SRC_BASE if it is not in /usr/src
-.endif
+do-build:
+	cd ${WRKDIR}/modules/fuse; ${MAKE}
+	cd ${WRKDIR}/mount_fusefs; ${MAKE}
 
-.if !defined(NOPORTDOCS)
-BUILD_DEPENDS+=	deplate:${PORTSDIR}/textproc/ruby-deplate
-.endif
+do-install:
+	${INSTALL_KLD} ${WRKSRC}/modules/fuse/fuse.ko ${STAGEDIR}${KMODDIR}
+	${INSTALL_MAN} ${WRKSRC}/mount_fusefs/mount_fusefs.8 ${STAGEDIR}${PREFIX}/man/man8
+	${INSTALL_PROGRAM} ${WRKSRC}/mount_fusefs/mount_fusefs ${STAGEDIR}${PREFIX}/sbin
 
-.if defined(WITH_AUTOSETUP)
-SUB_FILES+=	${SETUP}
-.else
-SUB_FILES+=	pkg-message
-.endif
+SVN_REV=	263233
+SVN_MIRROR?=	http://svn.freebsd.org/base
+EXPDIR=		${WRKSRC}/src
+maintainer-tar:
+	${MKDIR} ${EXPDIR}
+	cd ${EXPDIR} && svn export -r ${SVN_REV} ${SVN_MIRROR}/head/sys/fs/fuse/ fs/fuse
+	cd ${EXPDIR} && svn export -r ${SVN_REV} ${SVN_MIRROR}/head/sys/modules/fuse/ modules/fuse
+	cd ${EXPDIR} && svn export -r ${SVN_REV} ${SVN_MIRROR}/head/sbin/mount_fusefs mount_fusefs
+	cd ${EXPDIR} && svn export -r ${SVN_REV} ${SVN_MIRROR}/head/sbin/mount/getmntopts.c mount_fusefs/getmntopts.c
+	cd ${EXPDIR} && svn export -r ${SVN_REV} ${SVN_MIRROR}/head/sbin/mount/mntopts.h mount_fusefs/
+	cd ${EXPDIR} && ${TAR} --uname root --uid 0 --gname wheel --gid 0 -zcvf ${DISTDIR}/${PORTNAME}-0.${SVN_REV}${EXTRACT_SUFX} fs modules mount_fusefs
 
-post-patch:
-	@${REINPLACE_CMD} -e 's/deplate.rb/deplate/g' \
-		${WRKSRC}/doc/Makefile
-	@${REINPLACE_CMD} -e 's|-I../inc|-I${SRC_BASE}/sys -I../inc|g' \
-		${WRKSRC}/mount_fusefs/Makefile
+maintainer-check:
+	@new=`svn log -ql 1 ${SVN_MIRROR}@HEAD head/sys/fs/fuse | ${GREP} -v ^- | ${SED} -e 's| .*||; s|r||'`;\
+	old="${SVN_REV}";\
+	if [ "$${new}" -gt "$${old}" ]; then ${ECHO_MSG} "New fuse rev: r$${new} (was $${old})"; fi
 
-post-configure:
-	@${CP} ${LOCALBASE}/include/fuse/fuse_kernel.h ${WRKSRC}/fuse_module
-
-post-build:
-.if !defined(NOPORTDOCS)
-	@cd ${WRKSRC}/doc && make plaintext html_chunked
-.endif
-
-pre-su-install:
-	@${MKDIR} ${KMODDIR}
-
-post-install:
-	@${LN} -fs ${PREFIX}/sbin/mount_fusefs /usr/sbin
-.if defined(WITH_AUTOSETUP) && !defined(PACKAGE_BUILDING)
-	@${ECHO} "Modifying global startup config files and loading module..."
-	@${SH} ${WRKDIR}/${SETUP}
-.else
-	@${ECHO_CMD}; ${CAT} ${PKGMESSAGE}; ${ECHO_CMD}
-.endif
-
-.if !defined(NOPORTDOCS)
-	@${MKDIR} ${DOCSDIR}/kmod/html
-.for i in ${TXT_DOCS}
-	@${INSTALL_DATA} ${WRKSRC}/doc/plaintext_out/$i ${DOCSDIR}/kmod
-.endfor
-.for i in ${HTML_DOCS}
-	@${INSTALL_DATA} ${WRKSRC}/doc/html_chunked_out/$i ${DOCSDIR}/kmod/html
-.endfor
-.endif
-
 .include <bsd.port.post.mk>

Modified: trunk/sysutils/fusefs-kmod/distinfo
===================================================================
--- trunk/sysutils/fusefs-kmod/distinfo	2016-02-05 16:33:08 UTC (rev 20999)
+++ trunk/sysutils/fusefs-kmod/distinfo	2016-02-05 16:40:05 UTC (rev 21000)
@@ -1,2 +1,2 @@
-SHA256 (fuse4bsd/498acaef33b0.tar.gz) = 3fff52dc292f481b4c51cad3e9cf5f8982e38a25e809ee986e8406c81aff0119
-SIZE (fuse4bsd/498acaef33b0.tar.gz) = 116035
+SHA256 (fusefs-kmod-0.263233.tar.gz) = 68e0e5505cab651d089e6b0824b779676ae2a07d264724844f4980ffd6032933
+SIZE (fusefs-kmod-0.263233.tar.gz) = 58262

Added: trunk/sysutils/fusefs-kmod/files/extra-patch-9-fuse_main.c
===================================================================
--- trunk/sysutils/fusefs-kmod/files/extra-patch-9-fuse_main.c	                        (rev 0)
+++ trunk/sysutils/fusefs-kmod/files/extra-patch-9-fuse_main.c	2016-02-05 16:40:05 UTC (rev 21000)
@@ -0,0 +1,22 @@
+--- fs/fuse/fuse_main.c.orig	2014-12-02 15:57:14.465629906 +0200
++++ fs/fuse/fuse_main.c	2014-12-02 16:03:10.070605830 +0200
+@@ -92,10 +92,19 @@
+ 	.vfc_flags = VFCF_SYNTHETIC
+ };
+ 
++#ifdef SYSCTL_NULL_INT_PTR
++SYSCTL_INT(_vfs_fuse, OID_AUTO, kernelabi_major, CTLFLAG_RD,
++    SYSCTL_NULL_INT_PTR, FUSE_KERNEL_VERSION,
++    "FUSE kernel abi major version");
++SYSCTL_INT(_vfs_fuse, OID_AUTO, kernelabi_minor, CTLFLAG_RD,
++    SYSCTL_NULL_INT_PTR, FUSE_KERNEL_MINOR_VERSION,
++    "FUSE kernel abi minor version");
++#else
+ SYSCTL_INT(_vfs_fuse, OID_AUTO, kernelabi_major, CTLFLAG_RD,
+     0, FUSE_KERNEL_VERSION, "FUSE kernel abi major version");
+ SYSCTL_INT(_vfs_fuse, OID_AUTO, kernelabi_minor, CTLFLAG_RD,
+     0, FUSE_KERNEL_MINOR_VERSION, "FUSE kernel abi minor version");
++#endif // SYSCTL_NULL_INT_PTR
+ 
+ /******************************
+  *


Property changes on: trunk/sysutils/fusefs-kmod/files/extra-patch-9-fuse_main.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/sysutils/fusefs-kmod/files/extra-patch-9-fuse_vfsops.c
===================================================================
--- trunk/sysutils/fusefs-kmod/files/extra-patch-9-fuse_vfsops.c	                        (rev 0)
+++ trunk/sysutils/fusefs-kmod/files/extra-patch-9-fuse_vfsops.c	2016-02-05 16:40:05 UTC (rev 21000)
@@ -0,0 +1,62 @@
+--- fs/fuse/fuse_vfsops.c.orig	2014-03-16 12:55:57.000000000 +0200
++++ fs/fuse/fuse_vfsops.c	2014-12-02 16:02:35.879606170 +0200
+@@ -62,7 +62,7 @@
+ #include <sys/errno.h>
+ #include <sys/param.h>
+ #include <sys/kernel.h>
+-#include <sys/capsicum.h>
++#include <sys/capability.h>
+ #include <sys/conf.h>
+ #include <sys/filedesc.h>
+ #include <sys/uio.h>
+@@ -113,13 +113,24 @@
+ 	.vfs_statfs = fuse_vfsop_statfs,
+ };
+ 
++#ifdef SYSCTL_NULL_INT_PTR
++SYSCTL_INT(_vfs_fuse, OID_AUTO, init_backgrounded, CTLFLAG_RD,
++    SYSCTL_NULL_INT_PTR, 1, "indicate async handshake");
++#else
+ SYSCTL_INT(_vfs_fuse, OID_AUTO, init_backgrounded, CTLFLAG_RD,
+     0, 1, "indicate async handshake");
++#endif // SYSCTL_NULL_INT_PTR
+ static int fuse_enforce_dev_perms = 0;
+ 
++#ifdef SYSCTL_NULL_INT_PTR
++SYSCTL_INT(_vfs_fuse, OID_AUTO, enforce_dev_perms, CTLFLAG_RW,
++    &fuse_enforce_dev_perms, 0,
++    "enforce fuse device permissions for secondary mounts");
++#else
+ SYSCTL_LONG(_vfs_fuse, OID_AUTO, enforce_dev_perms, CTLFLAG_RW,
+     &fuse_enforce_dev_perms, 0,
+     "enforce fuse device permissions for secondary mounts");
++#endif // SYSCTL_NULL_INT_PTR
+ static unsigned sync_unmount = 1;
+ 
+ SYSCTL_UINT(_vfs_fuse, OID_AUTO, sync_unmount, CTLFLAG_RW,
+@@ -220,7 +231,6 @@
+ 	struct file *fp, *fptmp;
+ 	char *fspec, *subtype;
+ 	struct vfsoptlist *opts;
+-	cap_rights_t rights;
+ 
+ 	subtype = NULL;
+ 	max_read_set = 0;
+@@ -290,7 +300,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, CAP_READ, &fp);
+ 	if (err != 0) {
+ 		FS_DEBUG("invalid or not opened device: data=%p\n", data);
+ 		goto out;
+@@ -459,7 +469,7 @@
+ 				FUSE_UNLOCK();
+ 				VOP_UNLOCK(*vpp, 0);
+ 				vrele(*vpp);
+-				vrecycle(*vpp);
++				vrecycle(*vpp, curthread);
+ 				*vpp = data->vroot;
+ 			} else
+ 				FUSE_UNLOCK();


Property changes on: trunk/sysutils/fusefs-kmod/files/extra-patch-9-fuse_vfsops.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/sysutils/fusefs-kmod/files/extra-patch-9-fuse_vnops.c
===================================================================
--- trunk/sysutils/fusefs-kmod/files/extra-patch-9-fuse_vnops.c	                        (rev 0)
+++ trunk/sysutils/fusefs-kmod/files/extra-patch-9-fuse_vnops.c	2016-02-05 16:40:05 UTC (rev 21000)
@@ -0,0 +1,134 @@
+--- fs/fuse/fuse_vnops.c.orig
++++ fs/fuse/fuse_vnops.c
+@@ -579,7 +579,7 @@ fuse_vnop_inactive(struct vop_inactive_args *ap)
+ 	}
+ 
+ 	if ((fvdat->flag & FN_REVOKED) != 0 && fuse_reclaim_revoked) {
+-		vrecycle(vp);
++		vrecycle(vp, curthread);
+ 	}
+ 	return 0;
+ }
+@@ -706,7 +706,7 @@ fuse_vnop_lookup(struct vop_lookup_args *ap)
+ 		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 @@ fuse_vnop_getpages(struct vop_getpages_args *ap)
+ 	 * 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_vnop_getpages(struct vop_getpages_args *ap)
+ 			}
+ 		}
+ 		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 @@ fuse_vnop_getpages(struct vop_getpages_args *ap)
+ 
+ 	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_vnop_getpages(struct vop_getpages_args *ap)
+ 			}
+ 		}
+ 		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 @@ fuse_vnop_getpages(struct vop_getpages_args *ap)
+ 	 */
+ 
+ 	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 @@ fuse_vnop_getpages(struct vop_getpages_args *ap)
+ 			 * 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,39 @@ fuse_vnop_getpages(struct vop_getpages_args *ap)
+ 			 */
+ 			;
+ 		}
+-		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) {
++				if (m->oflags & VPO_WANTED) {
++					vm_page_lock(m);
++					vm_page_activate(m);
++					vm_page_unlock(m);
++				} else {
++					vm_page_lock(m);
++					vm_page_deactivate(m);
++					vm_page_unlock(m);
++				}
++				vm_page_wakeup(m);
++			} else {
++				vm_page_lock(m);
++				vm_page_free(m);
++				vm_page_unlock(m);
++			}
++		}
+ 	}
+ 	fuse_vm_page_unlock_queues();
+-	VM_OBJECT_WUNLOCK(vp->v_object);
++	VM_OBJECT_UNLOCK(vp->v_object);
+ 	return 0;
+ }
+ 
+@@ -1947,9 +1975,9 @@ fuse_vnop_putpages(struct vop_putpages_args *ap)
+ 
+ 		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];


Property changes on: trunk/sysutils/fusefs-kmod/files/extra-patch-9-fuse_vnops.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Deleted: trunk/sysutils/fusefs-kmod/files/extra-patch-fuse_module__fuse_vnops.c
===================================================================
--- trunk/sysutils/fusefs-kmod/files/extra-patch-fuse_module__fuse_vnops.c	2016-02-05 16:33:08 UTC (rev 20999)
+++ trunk/sysutils/fusefs-kmod/files/extra-patch-fuse_module__fuse_vnops.c	2016-02-05 16:40:05 UTC (rev 21000)
@@ -1,11 +0,0 @@
---- fuse_module/fuse_vfsops.c.orig	2008-02-05 07:25:57.000000000 +0200
-+++ fuse_module/fuse_vfsops.c	2011-09-08 10:27:43.000000000 +0300
-@@ -224,7 +231,7 @@
- 	struct cdev *fdev;
- 	struct sx *slock;
- 	struct fuse_data *data;
--	int mntopts = 0, __mntopts = 0, max_read_set = 0, secondary = 0;
-+	uint64_t mntopts = 0, __mntopts = 0, max_read_set = 0, secondary = 0;
- 	unsigned max_read = ~0;
- 	struct vnode *rvp;
- 	struct fuse_vnode_data *fvdat;

Modified: trunk/sysutils/fusefs-kmod/files/fusefs.in
===================================================================
--- trunk/sysutils/fusefs-kmod/files/fusefs.in	2016-02-05 16:33:08 UTC (rev 20999)
+++ trunk/sysutils/fusefs-kmod/files/fusefs.in	2016-02-05 16:40:05 UTC (rev 21000)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $FreeBSD$
+# $FreeBSD: head/sysutils/fusefs-kmod/files/fusefs.in 363947 2014-08-03 22:04:34Z pi $
 #
 # PROVIDE: fusefs
 # REQUIRE: sysctl
@@ -27,7 +27,7 @@
 name="fusefs"
 rcvar=fusefs_enable
 
-kmod="%%PREFIX%%/modules/fuse.ko"
+kmod="%%KMODDIR%%/fuse.ko"
 
 start_cmd="fusefs_start"
 stop_cmd="fusefs_stop"


Property changes on: trunk/sysutils/fusefs-kmod/files/fusefs.in
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.3
\ No newline at end of property
Added: trunk/sysutils/fusefs-kmod/files/patch-fuse_io.c
===================================================================
--- trunk/sysutils/fusefs-kmod/files/patch-fuse_io.c	                        (rev 0)
+++ trunk/sysutils/fusefs-kmod/files/patch-fuse_io.c	2016-02-05 16:40:05 UTC (rev 21000)
@@ -0,0 +1,14 @@
+--- fs/fuse/fuse_io.c.orig
++++ fs/fuse/fuse_io.c
+@@ -785,9 +785,9 @@ fuse_io_invalbuf(struct vnode *vp, struct thread *td)
+ 	fvdat->flag |= FN_FLUSHINPROG;
+ 
+ 	if (vp->v_bufobj.bo_object != NULL) {
+-		VM_OBJECT_WLOCK(vp->v_bufobj.bo_object);
++		VM_OBJECT_LOCK(vp->v_bufobj.bo_object);
+ 		vm_object_page_clean(vp->v_bufobj.bo_object, 0, 0, OBJPC_SYNC);
+-		VM_OBJECT_WUNLOCK(vp->v_bufobj.bo_object);
++		VM_OBJECT_UNLOCK(vp->v_bufobj.bo_object);
+ 	}
+ 	error = vinvalbuf(vp, V_SAVE, PCATCH, 0);
+ 	while (error) {


Property changes on: trunk/sysutils/fusefs-kmod/files/patch-fuse_io.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Deleted: trunk/sysutils/fusefs-kmod/files/patch-fuse_module__Makefile
===================================================================
--- trunk/sysutils/fusefs-kmod/files/patch-fuse_module__Makefile	2016-02-05 16:33:08 UTC (rev 20999)
+++ trunk/sysutils/fusefs-kmod/files/patch-fuse_module__Makefile	2016-02-05 16:40:05 UTC (rev 21000)
@@ -1,18 +0,0 @@
---- fuse_module/Makefile.orig	2008-02-05 08:25:57.000000000 +0300
-+++ fuse_module/Makefile	2009-01-14 00:29:13.000000000 +0300
-@@ -1,3 +1,5 @@
-+.undef KERNCONF
-+
- .include "../Makefile.common"
- 
- SRCS = fuse_main.c    \
-@@ -22,7 +24,8 @@
- 
- .if defined(KERNCONF)
- KERNCONF1!= echo ${KERNCONF} | sed -e 's/ .*//g'
--KERNCONFDIR= /usr/obj/usr/src/sys/${KERNCONF1}
-+KRNLOBJDIR!=	make -C /usr/src -f /usr/src/Makefile.inc1 -V KRNLOBJDIR
-+KERNCONFDIR= ${KRNLOBJDIR}/${KERNCONF1}
- .endif
- 
- .if defined(KERNCONFDIR)

Deleted: trunk/sysutils/fusefs-kmod/files/patch-fuse_module__fuse.h
===================================================================
--- trunk/sysutils/fusefs-kmod/files/patch-fuse_module__fuse.h	2016-02-05 16:33:08 UTC (rev 20999)
+++ trunk/sysutils/fusefs-kmod/files/patch-fuse_module__fuse.h	2016-02-05 16:40:05 UTC (rev 21000)
@@ -1,77 +0,0 @@
---- fuse_module/fuse.h.orig	2008-02-05 00:25:57.000000000 -0500
-+++ fuse_module/fuse.h	2013-03-26 20:31:30.000000000 -0400
-@@ -18,15 +18,31 @@
- #endif
- 
- #ifndef NEW_VNODES_ADJUSTED_MANUALLY
--#if __FreeBSD_version >= 700034
-+#if __MidnightBSD_version >= 3000
- #define NEW_VNODES_ADJUSTED_MANUALLY 1
- #else
- #define NEW_VNODES_ADJUSTED_MANUALLY 0
- #endif
- #endif
- 
-+#ifndef VFSOPS_TAKES_THREAD
-+#if __MidnightBSD_version >= 4016
-+#define VFSOPS_TAKES_THREAD 0
-+#else
-+#define VFSOPS_TAKES_THREAD 1
-+#endif
-+#endif
-+
-+#ifndef VOP_ACCESS_TAKES_ACCMODE_T
-+#if __MidnightBSD_version >= 4016
-+#define VOP_ACCESS_TAKES_ACCMODE_T 1
-+#else
-+#define VOP_ACCESS_TAKES_ACCMODE_T 0
-+#endif
-+#endif
-+
- #ifndef VOP_OPEN_TAKES_FP
--#if __FreeBSD_version >= 700044
-+#if __MidnightBSD_version >= 3000
- #define VOP_OPEN_TAKES_FP 1
- #else
- #define VOP_OPEN_TAKES_FP 0
-@@ -34,7 +50,7 @@
- #endif
- 
- #ifndef VN_LOCK_TAKES_THREAD
--#if __FreeBSD_version >= 800010
-+#if __MidnightBSD_version >= 4016
- #define VN_LOCK_TAKES_THREAD 0
- #else
- #define VN_LOCK_TAKES_THREAD 1
-@@ -42,13 +58,21 @@
- #endif
- 
- #ifndef VOP_UNLOCK_TAKES_THREAD
--#if __FreeBSD_version >= 800011
-+#if __MidnightBSD_version >= 4016
- #define VOP_UNLOCK_TAKES_THREAD 0
- #else
- #define VOP_UNLOCK_TAKES_THREAD 1
- #endif
- #endif
- 
-+#ifndef VOP_GETATTR_TAKES_THREAD
-+#if __MidnightBSD_version >= 4016
-+#define VOP_GETATTR_TAKES_THREAD 0
-+#else
-+#define VOP_GETATTR_TAKES_THREAD 1
-+#endif
-+#endif
-+
- #ifndef USE_PRIVILEGE_API
- /*
-  * __FreeBSD_version bump was omitted for introduction of
-@@ -56,7 +80,7 @@
-  * legacy API has been removed), so here we just use the first
-  * value of __FreeBSD_version after adding the priv stuff.
-  */
--#if __FreeBSD_version >= 700025
-+#if __MidnightBSD_version >= 4016
- #define USE_PRIVILEGE_API 1
- #else
- #define USE_PRIVILEGE_API 0

Deleted: trunk/sysutils/fusefs-kmod/files/patch-fuse_module__fuse_dev.c
===================================================================
--- trunk/sysutils/fusefs-kmod/files/patch-fuse_module__fuse_dev.c	2016-02-05 16:33:08 UTC (rev 20999)
+++ trunk/sysutils/fusefs-kmod/files/patch-fuse_module__fuse_dev.c	2016-02-05 16:40:05 UTC (rev 21000)
@@ -1,31 +0,0 @@
---- fuse_module/fuse_dev.c
-+++ fuse_module/fuse_dev.c
-@@ -52,8 +52,13 @@
- 	.d_read = fusedev_read,
- 	.d_write = fusedev_write,
- 	.d_version = D_VERSION,
-+#ifndef D_NEEDMINOR
-+#define D_NEEDMINOR 0
-+#endif
- #if ! DO_GIANT_MANUALLY
--	.d_flags = D_NEEDGIANT,
-+	.d_flags = D_NEEDMINOR|D_NEEDGIANT,
-+#else
-+	.d_flags = D_NEEDMINOR,
- #endif
- };
- 
-@@ -548,7 +553,12 @@
- 	/* find any existing device, or allocate new unit number */
- 	i = clone_create(&fuseclones, &fuse_cdevsw, &unit, dev, 0);
- 	if (i) {
--		*dev = make_dev(&fuse_cdevsw, unit2minor(unit),
-+		*dev = make_dev(&fuse_cdevsw,
-+#if __MidnightBSD_version < 4016
-+				unit2minor(unit),
-+#else /* __FreeBSD_version >= 800062 */
-+				unit,
-+#endif /* __FreeBSD_version < 800062 */
- 			        UID_ROOT, GID_OPERATOR,
- 		                S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP,
-                                 "fuse%d", unit);

Deleted: trunk/sysutils/fusefs-kmod/files/patch-fuse_module__fuse_io.c
===================================================================
--- trunk/sysutils/fusefs-kmod/files/patch-fuse_module__fuse_io.c	2016-02-05 16:33:08 UTC (rev 20999)
+++ trunk/sysutils/fusefs-kmod/files/patch-fuse_module__fuse_io.c	2016-02-05 16:40:05 UTC (rev 21000)
@@ -1,133 +0,0 @@
---- fuse_module/fuse_io.c.orig	2008-02-05 00:25:57.000000000 -0500
-+++ fuse_module/fuse_io.c	2009-07-13 09:31:24.000000000 -0400
-@@ -35,6 +35,10 @@
- #include <vm/vnode_pager.h>
- #include <vm/vm_object.h>
- 
-+#if (__MidnightBSD_version >= 4016) 
-+#define vfs_bio_set_validclean vfs_bio_set_valid
-+#endif
-+
- #include "fuse.h"
- #include "fuse_session.h"
- #include "fuse_vnode.h"
-@@ -157,7 +161,11 @@
- 		goto out;
- 
- 	if (uio->uio_rw == UIO_WRITE && fp->f_flag & O_APPEND) {
--		if ((err = VOP_GETATTR(vp, &va, cred, td)))
-+		if ((err = VOP_GETATTR(vp, &va, cred
-+#if VOP_GETATTR_TAKES_THREAD
-+		    , td
-+#endif
-+		    )))
- 			goto out;
- 		uio->uio_offset = va.va_size;
- 	} else if ((flags & FOF_OFFSET) == 0)
-@@ -227,7 +235,7 @@
- 		return (0);
- 
- 	biosize = vp->v_mount->mnt_stat.f_iosize;
--	bcount = min(MAXBSIZE, biosize);
-+	bcount = MIN(MAXBSIZE, biosize);
- 
- 	DEBUG2G("entering loop\n");
- 	do {
-@@ -352,7 +360,7 @@
- 		fri = fdi.indata;
- 		fri->fh = fufh->fh_id;
- 		fri->offset = uio->uio_offset;
--		fri->size = min(uio->uio_resid,
-+		fri->size = MIN(uio->uio_resid,
- 		                fusefs_get_data(vp->v_mount)->max_read);
- 	
- 		DEBUG2G("fri->fh %llu, fri->offset %d, fri->size %d\n",
-@@ -399,7 +407,7 @@
- 	while (uio->uio_resid > 0) {
- 		int transfersize;
- 
--		chunksize = min(iov->iov_len, nmax);
-+		chunksize = MIN(iov->iov_len, nmax);
- 
- 		if (uio->uio_rw == UIO_READ) {
- 			struct fuse_read_in *fri;
-@@ -464,7 +472,7 @@
- {
- 		int err;
- 
--		if ((err = uiomove(buf, min(reqsize, bufsize), uio)))
-+		if ((err = uiomove(buf, MIN(reqsize, bufsize), uio)))
- 			return (err);
- 
- 		if (bufsize < reqsize)
-@@ -502,7 +510,7 @@
- 	}
- 
- 	while (uio->uio_resid > 0) {
--		chunksize = min(uio->uio_resid,
-+		chunksize = MIN(uio->uio_resid,
- 		                fusefs_get_data(vp->v_mount)->max_write);
- 
- 		fdi.iosize = sizeof(*fwi) + chunksize;
-@@ -569,7 +577,7 @@
- 	do {
- 		lbn = uio->uio_offset / biosize;
- 		on = uio->uio_offset & (biosize-1);
--		n = min((unsigned)(biosize - on), uio->uio_resid);
-+		n = MIN((unsigned)(biosize - on), uio->uio_resid);
- 		
- 		DEBUG2G("lbn %d, on %d, n %d, uio offset %d, uio resid %d\n",
- 		        (int)lbn, on, n, (int)uio->uio_offset, uio->uio_resid);
-@@ -739,8 +747,8 @@
- 		 */
- 		if (n) {
- 			if (bp->b_dirtyend > 0) {
--				bp->b_dirtyoff = min(on, bp->b_dirtyoff);
--				bp->b_dirtyend = max((on + n), bp->b_dirtyend);
-+				bp->b_dirtyoff = MIN(on, bp->b_dirtyoff);
-+				bp->b_dirtyend = MAX((on + n), bp->b_dirtyend);
- 			} else {
- 				bp->b_dirtyoff = on;
- 				bp->b_dirtyend = on + n;
-@@ -823,7 +831,11 @@
- #if FUSELIB_CONFORM_BIOREAD
- 		struct vattr va;
- 
--		if ((err = VOP_GETATTR(vp, &va, cred, curthread)))
-+		if ((err = VOP_GETATTR(vp, &va, cred
-+#if VOP_GETATTR_TAKES_THREAD
-+		    , curthread
-+#endif
-+		    )))
- 			goto out;
- #endif
- 
-@@ -831,7 +843,7 @@
- 		bp->b_resid = bp->b_bcount;
- 		while (bp->b_resid > 0) {
- 			DEBUG2G("starting bio with resid %ld\n", bp->b_resid);	
--			chunksize = min(bp->b_resid,
-+			chunksize = MIN(bp->b_resid,
- 			                fusefs_get_data(vp->v_mount)->max_read);
- 			fdi.iosize = sizeof(*fri);
- 			if (! op)
-@@ -842,8 +854,8 @@
- 			fri->fh = fufh->fh_id;
- 			fri->offset = ((off_t)bp->b_blkno) * biosize + ioff;
- #if FUSELIB_CONFORM_BIOREAD
--			chunksize = min(chunksize,
--			                min(fri->offset + bp->b_resid,
-+			chunksize = MIN(chunksize,
-+			                MIN(fri->offset + bp->b_resid,
- 			                    va.va_size) - fri->offset);
- 			if (chunksize == 0) {
- 				respsize = -1;
-@@ -901,7 +913,7 @@
- 
- 		bufdat = bp->b_data + bp->b_dirtyoff;
- 		while (bp->b_dirtyend > bp->b_dirtyoff) {
--			chunksize = min(bp->b_dirtyend - bp->b_dirtyoff,
-+			chunksize = MIN(bp->b_dirtyend - bp->b_dirtyoff,
- 			                fusefs_get_data(vp->v_mount)->max_write);
- 	
- 			fdi.iosize = sizeof(*fwi);

Deleted: trunk/sysutils/fusefs-kmod/files/patch-fuse_module__fuse_main.c
===================================================================
--- trunk/sysutils/fusefs-kmod/files/patch-fuse_module__fuse_main.c	2016-02-05 16:33:08 UTC (rev 20999)
+++ trunk/sysutils/fusefs-kmod/files/patch-fuse_module__fuse_main.c	2016-02-05 16:40:05 UTC (rev 21000)
@@ -1,14 +0,0 @@
---- fuse_module/fuse_main.c.00	2010-08-15 14:40:29.000000000 +0400
-+++ fuse_module/fuse_main.c	2010-08-15 15:56:56.000000000 +0400
-@@ -108,6 +108,9 @@
- 	switch (what) {
- 	case MOD_LOAD:                /* kldload */
- 
-+#if __MidnightBSD_version > 4016
-+	        fuse_fileops.fo_truncate = vnops.fo_truncate;
-+#endif
- 		fuse_fileops.fo_ioctl    = vnops.fo_ioctl;
- 		fuse_fileops.fo_poll     = vnops.fo_poll;
- 		fuse_fileops.fo_kqfilter = vnops.fo_kqfilter;
-
-

Deleted: trunk/sysutils/fusefs-kmod/files/patch-fuse_module__fuse_vfsops.c
===================================================================
--- trunk/sysutils/fusefs-kmod/files/patch-fuse_module__fuse_vfsops.c	2016-02-05 16:33:08 UTC (rev 20999)
+++ trunk/sysutils/fusefs-kmod/files/patch-fuse_module__fuse_vfsops.c	2016-02-05 16:40:05 UTC (rev 21000)
@@ -1,122 +0,0 @@
---- fuse_module/fuse_vfsops.c.orig	2008-02-05 00:25:57.000000000 -0500
-+++ 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>
- #include <sys/sysctl.h>
-+#include <sys/fcntl.h>
- 
- #include "fuse.h"
- #include "fuse_session.h"
-@@ -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;
- 
--		(void)VOP_GETATTR(vp, &va, td->td_ucred, td);
-+		(void)VOP_GETATTR(vp, &va, td->td_ucred
-+#if VOP_GETATTR_TAKES_THREAD
-+		    , td
-+#endif
-+		);
- 	}
- 	*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"));

Deleted: trunk/sysutils/fusefs-kmod/files/patch-fuse_module__fuse_vnops.c
===================================================================
--- trunk/sysutils/fusefs-kmod/files/patch-fuse_module__fuse_vnops.c	2016-02-05 16:33:08 UTC (rev 20999)
+++ trunk/sysutils/fusefs-kmod/files/patch-fuse_module__fuse_vnops.c	2016-02-05 16:40:05 UTC (rev 21000)
@@ -1,89 +0,0 @@
---- ./fuse_module/fuse_vnops.c.orig	2012-09-19 06:04:10.512413490 +0200
-+++ ./fuse_module/fuse_vnops.c	2012-09-19 06:20:44.949613892 +0200
-@@ -799,8 +799,11 @@
- 	struct vnode *vp = ap->a_vp;
- 	struct vattr *vap = ap->a_vap;
- 	struct ucred *cred = ap->a_cred;
-+#if VOP_GETATTR_TAKES_THREAD
- 	struct thread *td = ap->a_td;
--
-+#else
-+	struct thread *td = curthread;
-+#endif
- 	struct fuse_dispatcher fdi;
- 	struct timespec uptsp;
- 	int err = 0;
-@@ -871,7 +874,11 @@
- fuse_access(ap)
- 	struct vop_access_args /* {
- 		struct vnode *a_vp;
-+#if VOP_ACCESS_TAKES_ACCMODE_T
-+		accmode_t a_accmode;
-+#else
- 		int a_mode;
-+#endif
- 		struct ucred *a_cred;
- 		struct thread *a_td;
- 	} */ *ap;
-@@ -886,7 +893,13 @@
- 	else
- 		facp.facc_flags |= FACCESS_DO_ACCESS;
- 
--	return fuse_access_i(vp, ap->a_mode, ap->a_cred, ap->a_td, &facp);
-+	return fuse_access_i(vp,
-+#if VOP_ACCESS_TAKES_ACCMODE_T
-+	    ap->a_accmode,
-+#else
-+	    ap->a_mode,
-+#endif
-+	    ap->a_cred, ap->a_td, &facp);
- }
- 
- /*
-@@ -946,7 +959,11 @@
- 		/* We are to do the check in-kernel */
- 
- 		if (! (facp->facc_flags & FACCESS_VA_VALID)) {
--			err = VOP_GETATTR(vp, VTOVA(vp), cred, td);
-+			err = VOP_GETATTR(vp, VTOVA(vp), cred
-+#if VOP_GETATTR_TAKES_THREAD
-+			    , td
-+#endif
-+			    );
- 			if (err)
- 				return (err);
- 			facp->facc_flags |= FACCESS_VA_VALID;
-@@ -1544,7 +1561,7 @@
- 	struct fuse_vnode_data *fvdat = VTOFUD(vp);
- 	uint64_t parentid = fvdat->parent_nid;
- 	struct componentname *cnp = fvdat->germcnp;
--	struct fuse_open_in *foi;
-+	struct fuse_create_in *foi;
- 	struct fuse_entry_out *feo;
- 	struct fuse_mknod_in fmni;
- 	int err;
-@@ -1929,7 +1946,11 @@
- 		 * It will not invalidate pages which are dirty, locked, under
- 		 * writeback or mapped into pagetables.") 
- 		 */
-+#if VOP_GETATTR_TAKES_THREAD
- 		err = vinvalbuf(vp, 0, td, PCATCH, 0);
-+#else
-+		err = vinvalbuf(vp, 0, PCATCH, 0);
-+#endif
- 		fufh->flags |= FOPEN_KEEP_CACHE;
- 	}
- 
-@@ -3005,8 +3026,11 @@
- 	struct vattr *vap = ap->a_vap;
- 	struct vnode *vp = ap->a_vp;
- 	struct ucred *cred = ap->a_cred;
-+#if VOP_GETATTR_TAKES_THREAD
- 	struct thread *td = ap->a_td;
--
-+#else
-+	struct thread *td = curthread;
-+#endif
- 	int err = 0;
- 	struct fuse_dispatcher fdi;
- 	struct fuse_setattr_in *fsai;

Added: trunk/sysutils/fusefs-kmod/files/patch-fuse_node.c
===================================================================
--- trunk/sysutils/fusefs-kmod/files/patch-fuse_node.c	                        (rev 0)
+++ trunk/sysutils/fusefs-kmod/files/patch-fuse_node.c	2016-02-05 16:40:05 UTC (rev 21000)
@@ -0,0 +1,11 @@
+--- fs/fuse/fuse_node.c.orig
++++ fs/fuse/fuse_node.c
+@@ -362,7 +362,7 @@ fuse_vnode_setsize(struct vnode *vp, struct ucred *cred, off_t newsize)
+ 	fvdat->flag |= FN_SIZECHANGE;
+ 
+ 	if (newsize < oldsize) {
+-		err = vtruncbuf(vp, cred, newsize, fuse_iosize(vp));
++		err = vtruncbuf(vp, cred, curthread, newsize, fuse_iosize(vp));
+ 	}
+ 	vnode_pager_setsize(vp, newsize);
+ 	return err;


Property changes on: trunk/sysutils/fusefs-kmod/files/patch-fuse_node.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Deleted: trunk/sysutils/fusefs-kmod/files/patch-mount_fusefs__mount_fusefs.c
===================================================================
--- trunk/sysutils/fusefs-kmod/files/patch-mount_fusefs__mount_fusefs.c	2016-02-05 16:33:08 UTC (rev 20999)
+++ trunk/sysutils/fusefs-kmod/files/patch-mount_fusefs__mount_fusefs.c	2016-02-05 16:40:05 UTC (rev 21000)
@@ -1,23 +0,0 @@
---- mount_fusefs/mount_fusefs.c	2008-02-05 07:25:57.000000000 +0200
-+++ mount_fusefs/mount_fusefs.c	2012-01-07 21:07:35.000000000 +0200
-@@ -44,6 +44,7 @@
- #include <getopt.h>
- #include <libgen.h>
- #include <limits.h>
-+#include <osreldate.h>
- #include <paths.h>
- 
- #include "fuse4bsd.h"
-@@ -312,7 +313,12 @@
- 	 * Resolve the mountpoint with realpath(3) and remove unnecessary
- 	 * slashes from the devicename if there are any.
- 	 */
-+#if __FreeBSD_version >= 1000005
-+	if (checkpath(dir, mntpath) != 0)
-+		err(1, "%s", mntpath);
-+#else
- 	(void)checkpath(dir, mntpath);
-+#endif
- 	(void)rmslashes(dev, dev);
- 
- 	if (strcmp(dev, "auto") == 0)

Modified: trunk/sysutils/fusefs-kmod/files/pkg-message.in
===================================================================
--- trunk/sysutils/fusefs-kmod/files/pkg-message.in	2016-02-05 16:33:08 UTC (rev 20999)
+++ trunk/sysutils/fusefs-kmod/files/pkg-message.in	2016-02-05 16:40:05 UTC (rev 21000)
@@ -1,3 +1,5 @@
+==============================================================================
+
 In order to automatically load the fuse module on startup, you need to:
 
  - Add fusefs_enable="YES" to your /etc/rc.conf.
@@ -13,3 +15,5 @@
 Note that the rc.d script will unmount all fuse filesystems when called with
 "stop" (in reverse order in case of nested mounts), so it can unload the
 kernel module.
+
+==============================================================================


Property changes on: trunk/sysutils/fusefs-kmod/files/pkg-message.in
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: trunk/sysutils/fusefs-kmod/files/setup.sh.in
===================================================================
--- trunk/sysutils/fusefs-kmod/files/setup.sh.in	2016-02-05 16:33:08 UTC (rev 20999)
+++ trunk/sysutils/fusefs-kmod/files/setup.sh.in	2016-02-05 16:40:05 UTC (rev 21000)
@@ -1,52 +0,0 @@
-#!/bin/sh
-#
-# Automatically setup the loading of the module without polluting /boot/modules
-SYSCTL_CONFIG=/etc/sysctl.conf
-LOADER_CONFIG=/etc/rc.conf
-
-sysctl kern.module_path | grep "[:space:;=]%%PREFIX%%/modules[;]\?\b" > /dev/null 2>&1; RESULT=$?
-if [ ${RESULT} -eq 1 ]; then
-	MODULE_PATH="`sysctl -n kern.module_path`;%%PREFIX%%/modules"
-	sysctl "kern.module_path=${MODULE_PATH}"
-else
-	MODULE_PATH=`sysctl -n kern.module_path`
-fi
-
-grep "kern\.module_path" ${SYSCTL_CONFIG} > /dev/null 2>&1; RESULT=$?
-if [ ${RESULT} -eq 0 ]; then
-	# Variable present
-	grep "kern\.module_path" ${SYSCTL_CONFIG} | grep "[:space:;=]%%PREFIX%%/modules[;]\?\b" ${SYSCTL_CONFIG} > /dev/null 2>&1; RESULT=$?
-	if [ ${RESULT} -eq 1 ]; then
-		# Not present in variable, so add
-		ESC_PREFIX=`echo '%%PREFIX%%' | sed -e 's/\//\\\\\//g'`
-		sed -i .orig -e 's/kern\.module_path[:space:]*=[:space:]*["]*\([[:alnum:][:space:]\.,;\/_-]*\)["]*/kern\.module_path="\1;'${ESC_PREFIX}'\/modules"/g' ${SYSCTL_CONFIG}
-	fi
-else
-	# Not present.
-	echo kern.module_path="${MODULE_PATH}" >> ${SYSCTL_CONFIG}
-fi
-
-
-kldstat -n fuse > /dev/null 2>&1; RESULT=$?
-if [ ${RESULT} -eq 0 ]; then
-	kldunload -n fuse > /dev/null 2>&1; RESULT=$?
-	if [ ${RESULT} -ne 0 ]; then
-		echo 'NOTICE: Failed to unload the Fuse module!'
-		echo 'NOTICE: Is fuse.ko in use?'
-	fi
-fi
-
-grep fusefs_enable ${LOADER_CONFIG} > /dev/null 2>&1; RESULT=$?
-if [ ${RESULT} -eq 0 ]; then
-	# Present, we should leave it alone
-#	sed -e s/fusefs_enable.*/fuse_load=\"YES\"/g -i.orig ${LOADER_CONFIG}
-else
-	# Not present. First time install, so lets start it up
-	echo 'fusefs_enable="YES"' >> ${LOADER_CONFIG}
-fi
-
-kldload fuse > /dev/null 2>&1 ; RESULT=$?
-if [ ${RESULT} -ne 0 ]; then
-	echo 'NOTICE: Failed to load the Fuse module!'
-	echo 'NOTICE: Unload and load Fuse module manually, or reboot.'
-fi

Modified: trunk/sysutils/fusefs-kmod/pkg-descr
===================================================================
--- trunk/sysutils/fusefs-kmod/pkg-descr	2016-02-05 16:33:08 UTC (rev 20999)
+++ trunk/sysutils/fusefs-kmod/pkg-descr	2016-02-05 16:40:05 UTC (rev 21000)
@@ -1,3 +1,2 @@
-Kernel module for fusefs based filesystems.
-
-WWW: http://fuse4bsd.creo.hu/
+Kernel module for fusefs based filesystems,
+backported from 10.x to 8.x and 9.x.

Modified: trunk/sysutils/fusefs-kmod/pkg-plist
===================================================================
--- trunk/sysutils/fusefs-kmod/pkg-plist	2016-02-05 16:33:08 UTC (rev 20999)
+++ trunk/sysutils/fusefs-kmod/pkg-plist	2016-02-05 16:40:05 UTC (rev 21000)
@@ -1,27 +1,6 @@
+man/man8/mount_fusefs.8.gz
 sbin/mount_fusefs
 @exec ln -fs %D/%F /usr/sbin
- at unexec rm -f /usr/sbin/mount_fusefs 2>&1 >/dev/null || true
-%%PORTDOCS%%%%DOCSDIR%%/kmod/doc.text
-%%PORTDOCS%%%%DOCSDIR%%/kmod/html/Faq.html
-%%PORTDOCS%%%%DOCSDIR%%/kmod/html/Implementation.html
-%%PORTDOCS%%%%DOCSDIR%%/kmod/html/Quickstart.html
-%%PORTDOCS%%%%DOCSDIR%%/kmod/html/article.css
-%%PORTDOCS%%%%DOCSDIR%%/kmod/html/deplate-mini.png
-%%PORTDOCS%%%%DOCSDIR%%/kmod/html/deplate.css
-%%PORTDOCS%%%%DOCSDIR%%/kmod/html/doc.html
-%%PORTDOCS%%%%DOCSDIR%%/kmod/html/heading-navbar.css
-%%PORTDOCS%%%%DOCSDIR%%/kmod/html/home-grey.png
-%%PORTDOCS%%%%DOCSDIR%%/kmod/html/mailto.png
-%%PORTDOCS%%%%DOCSDIR%%/kmod/html/next-grey.png
-%%PORTDOCS%%%%DOCSDIR%%/kmod/html/prev-grey.png
-%%PORTDOCS%%%%DOCSDIR%%/kmod/html/remote.png
-%%PORTDOCS%%%%DOCSDIR%%/kmod/html/serif.css
-%%PORTDOCS%%%%DOCSDIR%%/kmod/html/tabbar-right.css
-%%PORTDOCS%%@dirrm %%DOCSDIR%%/kmod/html
-%%PORTDOCS%%@dirrm %%DOCSDIR%%/kmod
- at dirrmtry %%DOCSDIR%%
- at exec mkdir %%KMODDIR%%
- at cwd %%KMODDIR%%
-fuse.ko
- at unexec kldxref %%KMODDIR%%
- at unexec rmdir %%KMODDIR%% 2>/dev/null || true
+ at unexec rm -f /usr/sbin/mount_fusefs
+ at cwd /
+boot/modules/fuse.ko



More information about the Midnightbsd-cvs mailing list