hacks to get 0.44pre going on netbsd-4

Jonathan A. Kollasch jakllsch at kollasch.net
Thu Aug 24 16:20:50 CEST 2006


On Tue, Aug 22, 2006 at 01:22:51PM +0200, Tomas Olsson wrote:
> "Jonathan A. Kollasch" <jakllsch at kollasch.net> writes:
> > I've been happily running 0.44pre on NetBSD 3.99.21
> > for a few months now. Aside from the no-PAGs-under-
> > kauth disaster, it works well.
> > 
> Great.
> 
> > Anyway that issue aside, there are a few tweaks
> > needed to get stuff going on -4:
> >
> Do you have usable patches?

I've attached what I've got so far. This only fixes the LKM issues.

How important is adapting arlad to use these new opaque file handles?
Either way I think that would involve touching configure, something
I don't want to figure out how to do.

> 
> I focus on our block_branch at the moment, haven't looked at netbsd for
> that yet (macos works well, though).  Take a look if you have time.  It's
> all Linux for me right now...

Perhaps I should, the lack of this feature is something I often gripe about.

> 
> > Is there a plan for implementing PAGs under kauth?
> >
> Well, it should be done, but I haven't heard anything.  The best would be
> if we could get kauth to support PAG's (or similar).  Any ideas?

Kauth is originally a Darwin thing, and it seems Elad took the liberty
to make the NetBSD implementation different enough to be frustrating
for folks needing to support both OSes.  However, this also opens
the possibility that NetBSD could diverge more to support this,
assuming Apple is uninterested; but this would probably mean
more #ifdefs in already somewhat difficult to follow code.
Additionally, any change as large as this would surely not
be allowed into 4.0.

Oh, also, the changes I asked for to get stuff going on -current
caused an undesirable side-effect of breaking PAGs on earlier
NetBSD releases.

Looks like I have some more tasks I could be doing.

	Jonathan Kollasch
-------------- next part --------------
diff -ur /tmp/arla/nnpfs/bsd/nnpfs/nnpfs_vfsops-bsd.h /home/jakllsch/arla/nnpfs/bsd/nnpfs/nnpfs_vfsops-bsd.h
--- /tmp/arla/nnpfs/bsd/nnpfs/nnpfs_vfsops-bsd.h	2006-06-12 14:42:36.000000000 -0500
+++ /home/jakllsch/arla/nnpfs/bsd/nnpfs/nnpfs_vfsops-bsd.h	2006-08-22 10:12:32.000000000 -0500
@@ -116,7 +116,11 @@
 
 int
 nnpfs_vptofh(struct vnode * vp,
-	     struct fid * fhp);
+	     struct fid * fhp,
+#if defined(__NetBSD__) && __NetBSD_Version__ >= 399002200 /* 3.99.22 */
+	     size_t * fidsz
+#endif
+	     );
 
 int
 nnpfs_dead_lookup(struct vop_lookup_args *ap);
diff -ur /tmp/arla/nnpfs/bsd/nnpfs_vfsops-bsd.c /home/jakllsch/arla/nnpfs/bsd/nnpfs_vfsops-bsd.c
--- /tmp/arla/nnpfs/bsd/nnpfs_vfsops-bsd.c	2006-06-12 14:39:14.000000000 -0500
+++ /home/jakllsch/arla/nnpfs/bsd/nnpfs_vfsops-bsd.c	2006-08-22 10:42:06.000000000 -0500
@@ -284,14 +284,25 @@
 
 int
 nnpfs_vptofh(struct vnode * vp,
-	   struct fid * fhp)
+	   struct fid * fhp,
+#if defined(__NetBSD__) && __NetBSD_Version__ >= 399002200 /* 3.99.22 */
+	   size_t * fidsz
+#endif
+	   )
 {
 #ifdef ARLA_KNFS
     struct nnpfs_node *xn;
     NNPFSDEB(XDEBVFOPS, ("nnpfs_vptofh\n"));
 
+#if defined(__NetBSD__) && __NetBSD_Version__ >= 399002200 /* 3.99.22 */
+    if (*fh_size < 16) {
+	*fh_size = 16;
+	return E2BIG;
+    }
+#else
     if (MAXFIDSZ < 16)
 	return EOPNOTSUPP;
+#endif
 
     xn = VNODE_TO_XNODE(vp);
 
@@ -554,8 +565,6 @@
 
 #if defined(__DragonFly__)
     error = falloc(proc->td_proc, &fp, &index);
-#elif defined(__NetBSD__) && __NetBSD_Version__ >= 399001400 /* 3.99.14 */
-    error = falloc(proc->l_proc, &fp, &index);
 #else
     error = falloc(proc, &fp, &index);
 #endif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://lists.stacken.kth.se/pipermail/arla-drinkers/attachments/20060824/c7129c73/attachment.bin


More information about the Arla-drinkers mailing list