Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Jun 2009 17:20:10 +0400
From:      pluknet <pluknet@gmail.com>
To:        Michael Butler <imb@protected-networks.net>
Cc:        freebsd-current <freebsd-current@freebsd.org>
Subject:   Re: fusefs-kmod now broken
Message-ID:  <a31046fc0906010620y6751a2e5wea0dd2c6090d1f7c@mail.gmail.com>
In-Reply-To: <4A23C147.2000607@protected-networks.net>
References:  <4A23C147.2000607@protected-networks.net>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
2009/6/1 Michael Butler <imb@protected-networks.net>:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Recent changes to VFS appear to have broken the FUSE kernel module :-(
>
> cc -O2 -pipe -march=prescott -fno-strict-aliasing -march=prescott
> - -Werror -D_KERNEL -DKLD_MODULE -nostdinc  -I../include -I. -I@
> - -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100
> - --param large-function-growth=1000 -fno-common  -mno-align-long-strings
> - -mpreferred-stack-boundary=2  -mno-mmx -mno-3dnow -mno-sse -mno-sse2
> - -mno-sse3 -ffreestanding -fstack-protector -std=iso9899:1999
> - -fstack-protector -Wall -Wredundant-decls -Wnested-externs
> - -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline
> - -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions -c fuse_io.c
> cc1: warnings being treated as errors
> fuse_io.c: In function 'fuse_write_biobackend':
> fuse_io.c:752: warning: implicit declaration of function
> 'vfs_bio_set_validclean'
> fuse_io.c:752: warning: nested extern declaration of
> 'vfs_bio_set_validclean'
> *** Error code 1

I guess you can safely substitute that with 'vfs_bio_set_valid' and friends.
As at whole AFAICS that's already out of sync with -current VM.

-- 
wbr,
pluknet

[-- Attachment #2 --]
diff -urpN fusefs-kmod.orig/files/patch-fuse_module__fuse.h fusefs-kmod/files/patch-fuse_module__fuse.h
--- fusefs-kmod.orig/files/patch-fuse_module__fuse.h	Mon Jun  1 16:47:24 2009
+++ fusefs-kmod/files/patch-fuse_module__fuse.h	Mon Jun  1 17:14:37 2009
@@ -1,9 +1,17 @@
---- fuse_module/fuse.h.orig	2008-02-05 00:25:57.000000000 -0500
-+++ fuse_module/fuse.h	2009-05-13 18:40:19.000000000 -0400
-@@ -25,6 +25,22 @@
+--- fuse_module/fuse.h.orig	Tue Feb  5 08:25:57 2008
++++ fuse_module/fuse.h	Mon Jun  1 16:50:19 2009
+@@ -25,6 +25,30 @@
  #endif
  #endif
  
++#ifndef USE_OLD_VALIDCLEAN_API
++#if __FreeBSD_version >= 800096
++#define USE_OLD_VALIDCLEAN_API 0
++#else
++#define USE_OLD_VALIDCLEAN_API 1
++#endif
++#endif
++
 +#ifndef VFSOPS_TAKES_THREAD
 +#if __FreeBSD_version >= 800087
 +#define VFSOPS_TAKES_THREAD 0
@@ -23,18 +31,18 @@
  #ifndef VOP_OPEN_TAKES_FP
  #if __FreeBSD_version >= 700044
  #define VOP_OPEN_TAKES_FP 1
-@@ -49,6 +65,14 @@
- #endif
- #endif
- 
+@@ -46,6 +70,14 @@
+ #define VOP_UNLOCK_TAKES_THREAD 0
+ #else
+ #define VOP_UNLOCK_TAKES_THREAD 1
++#endif
++#endif
++
 +#ifndef VOP_GETATTR_TAKES_THREAD
 +#if __FreeBSD_version >= 800046
 +#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
+ #endif
+ #endif
+ 
diff -urpN fusefs-kmod.orig/files/patch-fuse_module__fuse_io.c fusefs-kmod/files/patch-fuse_module__fuse_io.c
--- fusefs-kmod.orig/files/patch-fuse_module__fuse_io.c	Mon Jun  1 16:47:24 2009
+++ fusefs-kmod/files/patch-fuse_module__fuse_io.c	Mon Jun  1 17:14:57 2009
@@ -1,5 +1,5 @@
---- fuse_module/fuse_io.c.orig	2008-02-05 00:25:57.000000000 -0500
-+++ fuse_module/fuse_io.c	2008-09-26 13:15:56.000000000 -0400
+--- fuse_module/fuse_io.c.orig	Tue Feb  5 08:25:57 2008
++++ fuse_module/fuse_io.c	Mon Jun  1 17:13:01 2009
 @@ -157,7 +157,11 @@
  		goto out;
  
@@ -13,7 +13,19 @@
  			goto out;
  		uio->uio_offset = va.va_size;
  	} else if ((flags & FOF_OFFSET) == 0)
-@@ -823,7 +827,11 @@
+@@ -745,7 +749,11 @@
+ 				bp->b_dirtyoff = on;
+ 				bp->b_dirtyend = on + n;
+ 			}
++#if USE_OLD_VALIDCLEAN_API
+ 			vfs_bio_set_validclean(bp, on, n);
++#else
++			vfs_bio_set_valid(bp, on, n);
++#endif
+ 		}
+ 
+ 		bwrite(bp);
+@@ -823,7 +831,11 @@
  #if FUSELIB_CONFORM_BIOREAD
  		struct vattr va;
  
diff -urpN fusefs-kmod.orig/files/patch-fuse_module__fuse_vnops.c fusefs-kmod/files/patch-fuse_module__fuse_vnops.c
--- fusefs-kmod.orig/files/patch-fuse_module__fuse_vnops.c	Mon Jun  1 16:47:24 2009
+++ fusefs-kmod/files/patch-fuse_module__fuse_vnops.c	Mon Jun  1 17:15:21 2009
@@ -1,5 +1,5 @@
---- fuse_module/fuse_vnops.c.orig	2008-02-05 00:25:57.000000000 -0500
-+++ fuse_module/fuse_vnops.c	2008-10-29 19:21:51.000000000 -0400
+--- fuse/module/fuse_vnops.c.orig	Tue Feb  5 08:25:57 2008
++++ fuse_module/fuse_vnops.c	Mon Jun  1 17:13:09 2009
 @@ -799,8 +799,11 @@
  	struct vnode *vp = ap->a_vp;
  	struct vattr *vap = ap->a_vap;
@@ -78,3 +78,15 @@
  	int err = 0;
  	struct fuse_dispatcher fdi;
  	struct fuse_setattr_in *fsai;
+@@ -3455,7 +3479,11 @@
+ 			 * Read operation filled a partial page.
+ 			 */
+ 			m->valid = 0;
++#if USE_OLD_VALIDCLEAN_API
+ 			vm_page_set_validclean(m, 0, size - toff);
++#else
++			vm_page_set_valid(m, 0, size - toff);
++#endif
+ 			/* handled by vm_fault now	  */
+ 			/* vm_page_zero_invalid(m, TRUE); */
+ 		} else {
help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a31046fc0906010620y6751a2e5wea0dd2c6090d1f7c>