Date: Sat, 23 May 2009 17:53:19 GMT From: Tom McLaughlin <tmclaugh@FreeBSD.org> To: FreeBSD-gnats-submit@FreeBSD.org Cc: amistry@am-productions.biz Subject: ports/134876: sysutils/fusefs-kmod: Fix build after recent VFS changes on -CURRENT Message-ID: <200905231753.n4NHrJWh049699@freefall.freebsd.org> Resent-Message-ID: <200905231800.n4NI021F049906@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 134876 >Category: ports >Synopsis: sysutils/fusefs-kmod: Fix build after recent VFS changes on -CURRENT >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat May 23 18:00:02 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Tom McLaughlin >Release: FreeBSD 7.1-PRERELEASE i386 >Organization: >Environment: System: FreeBSD freefall.freebsd.org 7.1-PRERELEASE FreeBSD 7.1-PRERELEASE #36: Mon Dec 29 15:15:30 UTC 2008 simon@freefall.freebsd.org:/usr/src/sys/i386/compile/FREEFALL i386 >Description: Port fails to build on -CURRENT after revision 191990 [1] due to changes in the OS vfs layer. [1] http://svn.freebsd.org/viewvc/base?view=revision&revision=191990 >How-To-Repeat: Build port on -CURRENT after revision 191990. >Fix: --- fusefs-kmod.diff begins here --- Index: files/patch-fuse_module__fuse_vfsops.c =================================================================== RCS file: /ncvs/ports/sysutils/fusefs-kmod/files/patch-fuse_module__fuse_vfsops.c,v retrieving revision 1.2 diff -u -r1.2 patch-fuse_module__fuse_vfsops.c --- files/patch-fuse_module__fuse_vfsops.c 26 Sep 2008 18:26:35 -0000 1.2 +++ files/patch-fuse_module__fuse_vfsops.c 23 May 2009 07:36:57 -0000 @@ -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-23 03:35:27.924515262 -0400 @@ -18,6 +18,7 @@ #include <sys/namei.h> #include <sys/mount.h> @@ -8,7 +8,94 @@ #include "fuse.h" #include "fuse_session.h" -@@ -667,7 +668,11 @@ +@@ -190,6 +191,7 @@ + *************/ + + static __inline void ++ + fuse_send_init(struct fuse_data *data, struct thread *td) + { + #if FUSE_KERNELABI_GEQ(7, 5) +@@ -213,7 +215,11 @@ + * Mount system call + */ + static int ++#if __FreeBSD_version >= 800087 ++fuse_mount(struct mount *mp) ++#else + fuse_mount(struct mount *mp, struct thread *td) ++#endif + { + int err = 0; + size_t len; +@@ -228,6 +234,10 @@ + unsigned max_read = ~0; + struct vnode *rvp; + struct fuse_vnode_data *fvdat; ++#if __FreeBSD_version >= 800087 ++ struct thread *td; ++ td = curthread; ++#endif + + GIANT_REQUIRED; + KASSERT(fuse_useco >= 0, +@@ -529,12 +539,20 @@ + * Unmount system call + */ + static int ++#if __FreeBSD_version >= 800087 ++fuse_unmount(struct mount *mp, int mntflags) ++#else + fuse_unmount(struct mount *mp, int mntflags, struct thread *td) ++#endif + { + int flags = 0, err = 0; + struct fuse_data *data; + struct fuse_secondary_data *fsdat = NULL; + struct cdev *fdev; ++#if __FreeBSD_version >= 800087 ++ struct thread *td; ++ td = curthread; ++#endif + + GIANT_REQUIRED; + +@@ -633,13 +651,21 @@ + + /* stolen from portalfs */ + static int ++#if __FreeBSD_version >= 800087 ++fuse_root(struct mount *mp, int flags, struct vnode **vpp) ++#else + fuse_root(struct mount *mp, int flags, struct vnode **vpp, struct thread *td) ++#endif + { + /* + * Return locked reference to root. + */ + struct fuse_data *data = fusefs_get_data(mp); + struct vnode *vp; ++#if __FreeBSD_version >= 800087 ++ struct thread *td; ++ td = curthread; ++#endif + + DEBUG2G("mp %p: %s\n", mp, mp->mnt_stat.f_mntfromname); + +@@ -650,7 +676,11 @@ + data = fsdat->master; + sx_slock(&data->mhierlock); + if (data->mpri == FM_PRIMARY) +- err = fuse_root(data->mp, flags, vpp, td); ++#if __FreeBSD_version >= 800087 ++ err = fuse_root(data->mp, flags, vpp); ++#else ++ err = fuse_root(data->mp, flags, vpp, rd); ++#endif + else + err = ENXIO; + sx_sunlock(&data->mhierlock); +@@ -667,7 +697,11 @@ if (vp->v_type == VNON) { struct vattr va; @@ -21,3 +108,50 @@ } *vpp = vp; #if _DEBUG2G +@@ -678,12 +712,20 @@ + } + + static int ++#if __FreeBSD_version >= 800087 ++fuse_statfs(struct mount *mp, struct statfs *sbp) ++#else + fuse_statfs(struct mount *mp, struct statfs *sbp, struct thread *td) ++#endif + { + struct fuse_dispatcher fdi; + struct fuse_statfs_out *fsfo; + struct fuse_data *data; +- int err = 0; ++ int err = 0; ++#if __FreeBSD_version >= 800087 ++ struct thread *td; ++ td = curthread; ++#endif + + DEBUG2G("mp %p: %s\n", mp, mp->mnt_stat.f_mntfromname); + data = fusefs_get_data(mp); +@@ -696,7 +738,11 @@ + + sx_slock(&data->mhierlock); + if (data->mpri == FM_PRIMARY) +- err = fuse_statfs(data->mp, sbp, td); ++#if __FreeBSD_version >= 800087 ++ err = fuse_statfs(data->mp, sbp); ++#else ++ err = fuse_statfs(data->mp, sbp, tb); ++#endif + else + err = ENXIO; + sx_sunlock(&data->mhierlock); +@@ -794,7 +840,11 @@ + if (nodeid == FUSE_ROOT_ID) { + if (parentid != FUSE_NULL_ID) + return (ENOENT); ++#if __FreeBSD_version >= 800087 ++ err = VFS_ROOT(mp, myflags, vpp); ++#else + err = VFS_ROOT(mp, myflags, vpp, td); ++#endif + if (err) + return (err); + KASSERT(*vpp, ("we neither err'd nor found the root node")); --- fusefs-kmod.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905231753.n4NHrJWh049699>