ports/135285: [PATCH] sysutils/fusefs-kmod: Fix build on current
David Naylor
naylor.b.david at gmail.com
Fri Jun 5 14:40:02 UTC 2009
>Number: 135285
>Category: ports
>Synopsis: [PATCH] sysutils/fusefs-kmod: Fix build on current
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Fri Jun 05 14:40:00 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator: David Naylor
>Release: FreeBSD 8.0-CURRENT
>Organization:
Private
>Environment:
FreeBSD dragon.dg 8.0-CURRENT FreeBSD 8.0-CURRENT #0: Fri Jun 5 10:09:06 SAST 2009 root at dragon.dg:/tmp/usr/src/sys/GENERIC i386
>Description:
r193187 removes vfs_bio_set_validclean in favour of vfs_bio_set_valid. The two appear to be functionally the same.
>How-To-Repeat:
make -C/usr/ports/sysutils/fusefs-kmod all
>Fix:
See attached for the patches that use vfs_bio_set_validclean as an alias for vfs_bio_set_valid if vfs_bio_set_validclean is not defined.
(Compile tested only)
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:
#
# fusefs_kmod
# fusefs_kmod/files
# fusefs_kmod/files/patch-fuse_module__fuse_io.c
# fusefs_kmod/files/patch-fuse_module__fuse_vnops.c
#
echo c - fusefs_kmod
mkdir -p fusefs_kmod > /dev/null 2>&1
echo c - fusefs_kmod/files
mkdir -p fusefs_kmod/files > /dev/null 2>&1
echo x - fusefs_kmod/files/patch-fuse_module__fuse_io.c
sed 's/^X//' >fusefs_kmod/files/patch-fuse_module__fuse_io.c << '1475d536a980aa9335991ed7208f7f6a'
X--- fuse_module/fuse_io.c.orig 2008-02-05 07:25:57.000000000 +0200
X+++ fuse_module/fuse_io.c 2009-06-05 16:25:32.000000000 +0200
X@@ -35,6 +35,10 @@
X #include <vm/vnode_pager.h>
X #include <vm/vm_object.h>
X
X+#ifndef vfs_bio_set_validclean
X+#define vfs_bio_set_validclean vfs_bio_set_valid
X+#endif
X+
X #include "fuse.h"
X #include "fuse_session.h"
X #include "fuse_vnode.h"
X@@ -157,7 +161,11 @@
X goto out;
X
X if (uio->uio_rw == UIO_WRITE && fp->f_flag & O_APPEND) {
X- if ((err = VOP_GETATTR(vp, &va, cred, td)))
X+ if ((err = VOP_GETATTR(vp, &va, cred
X+#if VOP_GETATTR_TAKES_THREAD
X+ , td
X+#endif
X+ )))
X goto out;
X uio->uio_offset = va.va_size;
X } else if ((flags & FOF_OFFSET) == 0)
X@@ -823,7 +831,11 @@
X #if FUSELIB_CONFORM_BIOREAD
X struct vattr va;
X
X- if ((err = VOP_GETATTR(vp, &va, cred, curthread)))
X+ if ((err = VOP_GETATTR(vp, &va, cred
X+#if VOP_GETATTR_TAKES_THREAD
X+ , curthread
X+#endif
X+ )))
X goto out;
X #endif
X
1475d536a980aa9335991ed7208f7f6a
echo x - fusefs_kmod/files/patch-fuse_module__fuse_vnops.c
sed 's/^X//' >fusefs_kmod/files/patch-fuse_module__fuse_vnops.c << 'c57d47f29b9052dfcb560284ff0fdf77'
X--- fuse_module/fuse_vnops.c.orig 2008-02-05 07:25:57.000000000 +0200
X+++ fuse_module/fuse_vnops.c 2009-06-05 16:26:09.000000000 +0200
X@@ -37,6 +37,10 @@
X #include <vm/vnode_pager.h>
X #include <vm/vm_object.h>
X
X+#ifndef vfs_bio_set_validclean
X+#define vfs_bio_set_validclean vfs_bio_set_valid
X+#endif
X+
X #include "fuse.h"
X #include "fuse_session.h"
X #include "fuse_vnode.h"
X@@ -799,8 +803,11 @@
X struct vnode *vp = ap->a_vp;
X struct vattr *vap = ap->a_vap;
X struct ucred *cred = ap->a_cred;
X+#if VOP_GETATTR_TAKES_THREAD
X struct thread *td = ap->a_td;
X-
X+#else
X+ struct thread *td = curthread;
X+#endif
X struct fuse_dispatcher fdi;
X struct timespec uptsp;
X int err = 0;
X@@ -871,7 +878,11 @@
X fuse_access(ap)
X struct vop_access_args /* {
X struct vnode *a_vp;
X+#if VOP_ACCESS_TAKES_ACCMODE_T
X+ accmode_t a_accmode;
X+#else
X int a_mode;
X+#endif
X struct ucred *a_cred;
X struct thread *a_td;
X } */ *ap;
X@@ -886,7 +897,13 @@
X else
X facp.facc_flags |= FACCESS_DO_ACCESS;
X
X- return fuse_access_i(vp, ap->a_mode, ap->a_cred, ap->a_td, &facp);
X+ return fuse_access_i(vp,
X+#if VOP_ACCESS_TAKES_ACCMODE_T
X+ ap->a_accmode,
X+#else
X+ ap->a_mode,
X+#endif
X+ ap->a_cred, ap->a_td, &facp);
X }
X
X /*
X@@ -946,7 +963,11 @@
X /* We are to do the check in-kernel */
X
X if (! (facp->facc_flags & FACCESS_VA_VALID)) {
X- err = VOP_GETATTR(vp, VTOVA(vp), cred, td);
X+ err = VOP_GETATTR(vp, VTOVA(vp), cred
X+#if VOP_GETATTR_TAKES_THREAD
X+ , td
X+#endif
X+ );
X if (err)
X return (err);
X facp->facc_flags |= FACCESS_VA_VALID;
X@@ -1929,7 +1950,11 @@
X * It will not invalidate pages which are dirty, locked, under
X * writeback or mapped into pagetables.")
X */
X+#if VOP_GETATTR_TAKES_THREAD
X err = vinvalbuf(vp, 0, td, PCATCH, 0);
X+#else
X+ err = vinvalbuf(vp, 0, PCATCH, 0);
X+#endif
X fufh->flags |= FOPEN_KEEP_CACHE;
X }
X
X@@ -3005,8 +3030,11 @@
X struct vattr *vap = ap->a_vap;
X struct vnode *vp = ap->a_vp;
X struct ucred *cred = ap->a_cred;
X+#if VOP_GETATTR_TAKES_THREAD
X struct thread *td = ap->a_td;
X-
X+#else
X+ struct thread *td = curthread;
X+#endif
X int err = 0;
X struct fuse_dispatcher fdi;
X struct fuse_setattr_in *fsai;
c57d47f29b9052dfcb560284ff0fdf77
exit
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list