From nobody@FreeBSD.org  Wed Aug 24 11:09:26 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 94591106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 24 Aug 2011 11:09:26 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 847CA8FC0C
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 24 Aug 2011 11:09:26 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p7OB9Q6F009141
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 24 Aug 2011 11:09:26 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p7OB9QHF009140;
	Wed, 24 Aug 2011 11:09:26 GMT
	(envelope-from nobody)
Message-Id: <201108241109.p7OB9QHF009140@red.freebsd.org>
Date: Wed, 24 Aug 2011 11:09:26 GMT
From: pluknet <pluknet@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch] sysutils/fusefs-kmod: fix build after vfs_flagopt() change
X-Send-Pr-Version: www-3.1
X-GNATS-Notify: amistry@am-productions.biz

>Number:         160052
>Category:       ports
>Synopsis:       [patch] sysutils/fusefs-kmod: fix build after vfs_flagopt() change
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    swills
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Aug 24 11:10:08 UTC 2011
>Closed-Date:    Wed Sep 21 20:31:22 UTC 2011
>Last-Modified:  Wed Sep 21 20:31:22 UTC 2011
>Originator:     pluknet
>Release:        FreeBSD 9.0-BETA1 #10 r224471:225008M
>Organization:
>Environment:
>Description:
fix build on current after change in vfs_flagopt() declaration:
See svn r224290:
"This update changes the mnt_flag field in the mount structure
from 32 bits to 64 bits..."

>How-To-Repeat:

>Fix:
Replace two files in fusefs-kmod/${FILESDIR} with those attached as shar:
- patch-fuse_module__fuse.h
- patch-fuse_module__fuse_vfsops.c
Bump PORTREVISION

Patch attached with submission follows:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	patch-fuse_module__fuse.h.txt
#	patch-fuse_module__fuse_vfsops.c.txt
#
echo x - patch-fuse_module__fuse.h.txt
sed 's/^X//' >patch-fuse_module__fuse.h.txt << '787ecf63979136b4aae73edade86c0a6'
X--- fuse_module/fuse.h.orig	2008-02-05 08:25:57.000000000 +0300
X+++ fuse_module/fuse.h	2011-08-24 14:06:06.000000000 +0400
X@@ -25,6 +25,30 @@
X #endif
X #endif
X 
X+#ifndef VFSOPS_EXPANDED_MNT_FLAG
X+#if __FreeBSD_version >= 900040
X+#define	VFSOPS_EXPANDED_MNT_FLAG 1
X+#else
X+#define	VFSOPS_EXPANDED_MNT_FLAG 0
X+#endif
X+#endif
X+
X+#ifndef VFSOPS_TAKES_THREAD
X+#if __FreeBSD_version >= 800087
X+#define VFSOPS_TAKES_THREAD 0
X+#else
X+#define VFSOPS_TAKES_THREAD 1
X+#endif
X+#endif
X+
X+#ifndef VOP_ACCESS_TAKES_ACCMODE_T
X+#if __FreeBSD_version >= 800052
X+#define VOP_ACCESS_TAKES_ACCMODE_T 1
X+#else
X+#define VOP_ACCESS_TAKES_ACCMODE_T 0
X+#endif
X+#endif
X+
X #ifndef VOP_OPEN_TAKES_FP
X #if __FreeBSD_version >= 700044
X #define VOP_OPEN_TAKES_FP 1
X@@ -49,6 +73,14 @@
X #endif
X #endif
X 
X+#ifndef VOP_GETATTR_TAKES_THREAD
X+#if __FreeBSD_version >= 800046
X+#define VOP_GETATTR_TAKES_THREAD 0
X+#else
X+#define VOP_GETATTR_TAKES_THREAD 1
X+#endif
X+#endif
X+
X #ifndef USE_PRIVILEGE_API
X /*
X  * __FreeBSD_version bump was omitted for introduction of
787ecf63979136b4aae73edade86c0a6
echo x - patch-fuse_module__fuse_vfsops.c.txt
sed 's/^X//' >patch-fuse_module__fuse_vfsops.c.txt << '5191c11145941e546715179b585bf437'
X--- fuse_module/fuse_vfsops.c.orig	2008-02-05 08:25:57.000000000 +0300
X+++ fuse_module/fuse_vfsops.c	2011-08-24 14:10:36.000000000 +0400
X@@ -18,6 +18,7 @@
X #include <sys/namei.h>
X #include <sys/mount.h>
X #include <sys/sysctl.h>
X+#include <sys/fcntl.h>
X 
X #include "fuse.h"
X #include "fuse_session.h"
X@@ -213,8 +214,14 @@ fuse_send_init(struct fuse_data *data, s
X  * Mount system call
X  */
X static int
X+#if VFSOPS_TAKES_THREAD
X fuse_mount(struct mount *mp, struct thread *td)
X {
X+#else
X+fuse_mount(struct mount *mp)
X+{
X+	struct thread *td = curthread;
X+#endif
X 	int err = 0;
X 	size_t len;
X 	char *fspec, *subtype = NULL;
X@@ -224,7 +231,12 @@ fuse_mount(struct mount *mp, struct thre
X 	struct cdev *fdev;
X 	struct sx *slock;
X 	struct fuse_data *data;
X-	int mntopts = 0, __mntopts = 0, max_read_set = 0, secondary = 0;
X+#if VFSOPS_EXPANDED_MNT_FLAG
X+	uint64_t mntopts = 0, __mntopts = 0;
X+#else
X+	int mntopts = 0, __mntopts = 0;
X+#endif
X+	int max_read_set = 0, secondary = 0;
X 	unsigned max_read = ~0;
X 	struct vnode *rvp;
X 	struct fuse_vnode_data *fvdat;
X@@ -529,8 +541,14 @@ out:
X  * Unmount system call
X  */
X static int
X+#if VFSOPS_TAKES_THREAD
X fuse_unmount(struct mount *mp, int mntflags, struct thread *td)
X {
X+#else
X+fuse_unmount(struct mount *mp, int mntflags)
X+{
X+	struct thread *td = curthread;
X+#endif
X 	int flags = 0, err = 0;
X 	struct fuse_data *data;
X 	struct fuse_secondary_data *fsdat = NULL;
X@@ -633,8 +651,14 @@ unlock:
X 
X /* stolen from portalfs */
X static int
X+#if VFSOPS_TAKES_THREAD
X fuse_root(struct mount *mp, int flags, struct vnode **vpp, struct thread *td)
X {
X+#else
X+fuse_root(struct mount *mp, int flags, struct vnode **vpp)
X+{
X+	struct thread *td = curthread;
X+#endif
X 	/*
X 	 * Return locked reference to root.
X 	 */
X@@ -650,7 +674,11 @@ fuse_root(struct mount *mp, int flags, s
X 		data = fsdat->master;
X 		sx_slock(&data->mhierlock);
X 		if (data->mpri == FM_PRIMARY)
X-			err = fuse_root(data->mp, flags, vpp, td);
X+			err = fuse_root(data->mp, flags, vpp
X+#if VFSOPS_TAKES_THREAD
X+			    , td
X+#endif
X+			    );
X 		else
X 			err = ENXIO;
X 		sx_sunlock(&data->mhierlock);
X@@ -667,7 +695,11 @@ fuse_root(struct mount *mp, int flags, s
X 	if (vp->v_type == VNON) {
X 		struct vattr va;
X 
X-		(void)VOP_GETATTR(vp, &va, td->td_ucred, td);
X+		(void)VOP_GETATTR(vp, &va, td->td_ucred
X+#if VOP_GETATTR_TAKES_THREAD
X+		    , td
X+#endif
X+		);
X 	}
X 	*vpp = vp;
X #if _DEBUG2G
X@@ -678,8 +710,14 @@ fuse_root(struct mount *mp, int flags, s
X }
X 
X static int
X+#if VFSOPS_TAKES_THREAD
X fuse_statfs(struct mount *mp, struct statfs *sbp, struct thread *td)
X {
X+#else
X+fuse_statfs(struct mount *mp, struct statfs *sbp)
X+{
X+	struct thread *td = curthread;
X+#endif
X 	struct fuse_dispatcher fdi;
X 	struct fuse_statfs_out *fsfo;
X 	struct fuse_data *data;
X@@ -696,7 +734,11 @@ fuse_statfs(struct mount *mp, struct sta
X 
X 		sx_slock(&data->mhierlock);
X 		if (data->mpri == FM_PRIMARY)
X-			err = fuse_statfs(data->mp, sbp, td);
X+			err = fuse_statfs(data->mp, sbp
X+#if VFSOPS_TAKES_THREAD
X+			    , td
X+#endif
X+			    );
X 		else
X 			err = ENXIO;
X 		sx_sunlock(&data->mhierlock);
X@@ -794,7 +836,11 @@ fuse_vget_i(struct mount *mp, struct thr
X 	if (nodeid == FUSE_ROOT_ID) {
X 		if (parentid != FUSE_NULL_ID)
X 			return (ENOENT);
X-		err = VFS_ROOT(mp, myflags, vpp, td);
X+		err = VFS_ROOT(mp, myflags, vpp
X+#if VFSOPS_TAKES_THREAD
X+		    , td
X+#endif
X+		    );
X 		if (err)
X 			return (err);
X 		KASSERT(*vpp, ("we neither err'd nor found the root node"));
5191c11145941e546715179b585bf437
exit



>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Wed Aug 24 11:10:19 UTC 2011 
State-Changed-Why:  
Awaiting maintainers feedback (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=160052 

From: Edwin Groothuis <edwin@FreeBSD.org>
To: amistry@am-productions.biz
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/160052: [patch] sysutils/fusefs-kmod: fix build after vfs_flagopt() change
Date: Wed, 24 Aug 2011 11:10:16 UT

 Maintainer of sysutils/fusefs-kmod,
 
 Please note that PR ports/160052 has just been submitted.
 
 If it contains a patch for an upgrade, an enhancement or a bug fix
 you agree on, reply to this email stating that you approve the patch
 and a committer will take care of it.
 
 The full text of the PR can be found at:
     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/160052
 
 -- 
 Edwin Groothuis via the GNATS Auto Assign Tool
 edwin@FreeBSD.org

From: Sergey Kandaurov <pluknet@gmail.com>
To: bug-followup@FreeBSD.org, pluknet@gmail.com
Cc:  
Subject: Re: ports/160052: [patch] sysutils/fusefs-kmod: fix build after
 vfs_flagopt() change
Date: Wed, 24 Aug 2011 15:25:21 +0400

 Somewhat duplicates ports/159230 and ports/159361, though
Responsible-Changed-From-To: freebsd-ports-bugs->swills 
Responsible-Changed-By: swills 
Responsible-Changed-When: Wed Sep 21 18:36:16 UTC 2011 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=160052 
State-Changed-From-To: feedback->closed 
State-Changed-By: swills 
State-Changed-When: Wed Sep 21 20:31:20 UTC 2011 
State-Changed-Why:  
Duplicate of PR ports/160608 for which a fix was committed. Please open 
new PR if issue remains. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=160052 
>Unformatted:
