[4215] in arla-drinkers

home help back first fref pref prev next nref lref last post

Re: towards getting netbsd 4 supported as well as 3 is

daemon@ATHENA.MIT.EDU (Pavel Cahyna)
Thu Nov 1 17:07:08 2007

From arla-drinkers-bounces@stacken.kth.se Thu Nov 01 21:07:08 2007
Return-Path: <arla-drinkers-bounces@stacken.kth.se>
Delivered-To: arla-drinkers-mtg@bloom-picayune.mit.edu
Received: (qmail 22309 invoked from network); 1 Nov 2007 21:07:07 -0000
Received: from mx2.kth.se (130.237.48.98)
  by charon.mit.edu with SMTP; 1 Nov 2007 21:07:07 -0000
Received: from localhost (localhost [127.0.0.1])
	by mx2.kth.se (Postfix) with ESMTP id D5049109E42;
	Thu,  1 Nov 2007 22:07:05 +0100 (CET)
X-Virus-Scanned: by amavisd-new at kth.se
Received: from mx2.kth.se ([127.0.0.1])
	by localhost (mx2.kth.se [127.0.0.1]) (amavisd-new, port 10024)
	with LMTP id sQjfJL-ieXZj; Thu,  1 Nov 2007 22:07:01 +0100 (CET)
Received: from tapas.stacken.kth.se (tapas.stacken.kth.se [130.237.234.140])
	by mx2.kth.se (Postfix) with ESMTP id 67604109F1B;
	Thu,  1 Nov 2007 22:06:40 +0100 (CET)
Received: from tapas.stacken.kth.se (localhost [127.0.0.1])
	by tapas.stacken.kth.se (Postfix) with ESMTP id 6836B53529;
	Thu,  1 Nov 2007 22:06:40 +0100 (CET)
X-Original-To: arla-drinkers@tapas.stacken.kth.se
Delivered-To: arla-drinkers@tapas.stacken.kth.se
Received: from brev.stacken.kth.se (brev.stacken.kth.se [130.237.234.84])
	by tapas.stacken.kth.se (Postfix) with ESMTP id C8A3353529
	for <arla-drinkers@tapas.stacken.kth.se>;
	Thu,  1 Nov 2007 22:06:37 +0100 (CET)
Received: from mx1.kth.se (mx1.kth.se [130.237.32.140])
	by brev.stacken.kth.se (8.12.10/8.12.10) with ESMTP id lA1L6bn7027453
	for <arla-drinkers@stacken.kth.se>; Thu, 1 Nov 2007 22:06:37 +0100 (MET)
Received: from localhost (localhost [127.0.0.1])
	by mx1.kth.se (Postfix) with ESMTP id 42DD216C04D
	for <arla-drinkers@stacken.kth.se>;
	Thu,  1 Nov 2007 22:06:32 +0100 (CET)
X-Virus-Scanned: by amavisd-new at kth.se
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level: 
X-Spam-Status: No, score=-2.599 tagged_above=-200 required=5
	tests=[BAYES_00=-2.599]
Received: from mx1.kth.se ([127.0.0.1])
	by localhost (mx1.kth.se [127.0.0.1]) (amavisd-new, port 10024)
	with LMTP id iPiOGwIbmNKv for <arla-drinkers@stacken.kth.se>;
	Thu,  1 Nov 2007 22:06:22 +0100 (CET)
Received: from artax.karlin.mff.cuni.cz (artax.karlin.mff.cuni.cz
	[195.113.31.125]) by mx1.kth.se (Postfix) with ESMTP id 529D3FD2F5
	for <arla-drinkers@stacken.kth.se>;
	Thu,  1 Nov 2007 22:06:22 +0100 (CET)
Received: by artax.karlin.mff.cuni.cz (Postfix, from userid 18322)
	id 03641981BB; Thu,  1 Nov 2007 22:06:22 +0100 (CET)
Date: Thu, 1 Nov 2007 22:06:21 +0100
From: Pavel Cahyna <pcah8322@artax.karlin.mff.cuni.cz>
To: arla-drinkers@stacken.kth.se
Subject: Re: towards getting netbsd 4 supported as well as 3 is
Message-ID: <20071101210621.GB25896@artax.karlin.mff.cuni.cz>
Mail-Followup-To: arla-drinkers@stacken.kth.se
References: <20070524143723.GB18994@kirkkit.kollasch.net>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="Yylu36WmvOXNoKYn"
Content-Disposition: inline
In-Reply-To: <20070524143723.GB18994@kirkkit.kollasch.net>
User-Agent: Mutt/1.5.13 (2006-08-11)
X-BeenThere: arla-drinkers@stacken.kth.se
X-Mailman-Version: 2.1.6
Precedence: list
List-Id: Arla discussions <arla-drinkers.stacken.kth.se>
List-Unsubscribe: <https://lists.stacken.kth.se/mailman/listinfo/arla-drinkers>, 
	<mailto:arla-drinkers-request@stacken.kth.se?subject=unsubscribe>
List-Archive: <http://lists.stacken.kth.se/pipermail/arla-drinkers>
List-Post: <mailto:arla-drinkers@stacken.kth.se>
List-Help: <mailto:arla-drinkers-request@stacken.kth.se?subject=help>
List-Subscribe: <https://lists.stacken.kth.se/mailman/listinfo/arla-drinkers>, 
	<mailto:arla-drinkers-request@stacken.kth.se?subject=subscribe>
Sender: arla-drinkers-bounces@stacken.kth.se
Errors-To: arla-drinkers-bounces@stacken.kth.se


--Yylu36WmvOXNoKYn
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

hello,

I have applied your patch and arla compiles. Now, there was a VFS API
change in NetBSD-current in last December [1] which was pulled up to netbsd-4,
so the following patch is needed. Thanks to Chuck Silvers for review.

Without it, a DIAGNOSTIC kernel crashes soon with a panic from lockmgr.

I have used arla with this change for a long time and it seems stable.

Could please someone commit this change to an arla stable branch?

BTW what functionality is lost by removal of the filehandle functionality?
Is nnpfs supposed to be nfs-re-exportable?

Pavel

[1] http://mail-index.netbsd.org/source-changes/2006/12/09/0025.html

On Thu, May 24, 2007 at 09:37:23AM -0500, Jonathan A. Kollasch wrote:
> Hi,
> 
> for starters, here's how you get a basic arla client on netbsd-4:
> 
> in nnpfs/bsd/nnpfs_vfsops-bsd.c 
> before nnpfs_fhlookup(), make it so that it is compiled on NetBSD:
> 
> -#ifdef __APPLE__
> +#if defined(__APPLE__) || defined(__NetBSD__)
> 
> remove the HAVE_GETFH and HAVE_FHOPEN #defines in include/config.h after running configure
> 
> 
> I suppose I could learn autoconf ...
> 
> However, PAGs will not work at this point.  Converting to kauth(9) calls
> looks very doable with some work and thought.  I might start looking
> at this.
> 
> 	Jonathan Kollasch



> _______________________________________________
> Arla-drinkers mailing list
> Arla-drinkers@stacken.kth.se
> https://lists.stacken.kth.se/mailman/listinfo/arla-drinkers


--Yylu36WmvOXNoKYn
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename="lookup.diff"

Index: nnpfs_vfsops-bsd.c
===================================================================
RCS file: /afs/stacken.kth.se/src/SourceRepository/arla/nnpfs/bsd/nnpfs_vfsops-bsd.c,v
retrieving revision 1.101
diff -u -p -r1.101 nnpfs_vfsops-bsd.c
--- nnpfs_vfsops-bsd.c	1 Sep 2006 14:37:27 -0000	1.101
+++ nnpfs_vfsops-bsd.c	16 Jun 2007 14:07:06 -0000
@@ -370,7 +370,7 @@ nnpfs_dead_putpages (struct vop_putpages
  * error otherwise.  
  */
 
-#ifdef __APPLE__
+#if defined(__APPLE__) || defined(__NetBSD__)
 
 int
 nnpfs_fhlookup (d_thread_t *proc,
Index: nnpfs_vnodeops-bsd.c
===================================================================
RCS file: /afs/stacken.kth.se/src/SourceRepository/arla/nnpfs/bsd/nnpfs_vnodeops-bsd.c,v
retrieving revision 1.156
diff -u -p -r1.156 nnpfs_vnodeops-bsd.c
--- nnpfs_vnodeops-bsd.c	12 Jun 2006 19:39:59 -0000	1.156
+++ nnpfs_vnodeops-bsd.c	21 Jun 2007 22:37:42 -0000
@@ -283,8 +283,10 @@ nnpfs_lookup(struct vop_lookup_args * ap
     nnpfs_vfs_context ctx;
     int error;
 
+#if !defined(__NetBSD__) || (__NetBSD_Version__ < 499000600 && __NetBSD_Version__ >= 499000000) || __NetBSD_Version__ < 400000002
     int lockparent = (cnp->cn_flags & (LOCKPARENT | ISLASTCN))
 	== (LOCKPARENT | ISLASTCN);
+#endif
 
     NNPFSDEB(XDEBVNOPS, ("nnpfs_lookup: (%s, %ld), nameiop = %lu, flags = %lu\n",
 		       cnp->cn_nameptr,
@@ -308,6 +310,7 @@ nnpfs_lookup(struct vop_lookup_args * ap
     if (cnp->cn_nameiop != LOOKUP && cnp->cn_flags & ISLASTCN)
 	cnp->cn_flags |= SAVENAME;
 
+#if !defined(__NetBSD__) || (__NetBSD_Version__ < 499000600 && __NetBSD_Version__ >= 499000000) || __NetBSD_Version__ < 400000002
     if (error == 0 || error == EJUSTRETURN) {
 	if (ap->a_dvp == *(ap->a_vpp)) {
 	    /* if we looked up ourself, do nothing */
@@ -323,6 +326,7 @@ nnpfs_lookup(struct vop_lookup_args * ap
     } else {
 	/* in case of a error do nothing  */
     } 
+#endif
     
     NNPFSDEB(XDEBVNOPS, ("nnpfs_lookup: error = %d\n", error));
 

--Yylu36WmvOXNoKYn
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Arla-drinkers mailing list
Arla-drinkers@stacken.kth.se
https://lists.stacken.kth.se/mailman/listinfo/arla-drinkers

--Yylu36WmvOXNoKYn--

home help back first fref pref prev next nref lref last post