[4216] in arla-drinkers
Re: towards getting netbsd 4 supported as well as 3 is
daemon@ATHENA.MIT.EDU (Pavel Cahyna)
Thu Nov 1 17:18:51 2007
From arla-drinkers-bounces@stacken.kth.se Thu Nov 01 21:18:50 2007
Return-Path: <arla-drinkers-bounces@stacken.kth.se>
Delivered-To: arla-drinkers-mtg@bloom-picayune.mit.edu
Received: (qmail 22979 invoked from network); 1 Nov 2007 21:18:50 -0000
Received: from mx2.kth.se (130.237.48.98)
by charon.mit.edu with SMTP; 1 Nov 2007 21:18:50 -0000
Received: from localhost (localhost [127.0.0.1])
by mx2.kth.se (Postfix) with ESMTP id BB7E2109F1B;
Thu, 1 Nov 2007 22:18:48 +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 NbgsyK3ZtFoJ; Thu, 1 Nov 2007 22:18:44 +0100 (CET)
Received: from tapas.stacken.kth.se (tapas.stacken.kth.se [130.237.234.140])
by mx2.kth.se (Postfix) with ESMTP id 65665109871;
Thu, 1 Nov 2007 22:18:37 +0100 (CET)
Received: from tapas.stacken.kth.se (localhost [127.0.0.1])
by tapas.stacken.kth.se (Postfix) with ESMTP id EF2785352D;
Thu, 1 Nov 2007 22:18:36 +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 B11BE5352D
for <arla-drinkers@tapas.stacken.kth.se>;
Thu, 1 Nov 2007 22:18:34 +0100 (CET)
Received: from mx3.kth.se (mx3.kth.se [130.237.48.97])
by brev.stacken.kth.se (8.12.10/8.12.10) with ESMTP id lA1LIYn7027536
for <arla-drinkers@stacken.kth.se>; Thu, 1 Nov 2007 22:18:34 +0100 (MET)
Received: from localhost (localhost [127.0.0.1])
by mx3.kth.se (Postfix) with ESMTP id 3F23269851
for <arla-drinkers@stacken.kth.se>;
Thu, 1 Nov 2007 22:18:29 +0100 (CET)
X-Virus-Scanned: by amavisd-new at kth.se
X-Spam-Score: -2.598
X-Spam-Level:
X-Spam-Status: No, score=-2.598 tagged_above=-200 required=5
tests=[BAYES_00=-2.599, DKIM_POLICY_SIGNSOME=0.001]
Received: from mx3.kth.se ([127.0.0.1])
by localhost (mx3.kth.se [127.0.0.1]) (amavisd-new, port 10024)
with LMTP id W0xuKv97O6Y1 for <arla-drinkers@stacken.kth.se>;
Thu, 1 Nov 2007 22:18:26 +0100 (CET)
Received: from artax.karlin.mff.cuni.cz (artax.karlin.mff.cuni.cz
[195.113.31.125]) by mx3.kth.se (Postfix) with ESMTP id 478456A201
for <arla-drinkers@stacken.kth.se>;
Thu, 1 Nov 2007 22:18:26 +0100 (CET)
Received: by artax.karlin.mff.cuni.cz (Postfix, from userid 18322)
id 0EC1E981D3; Thu, 1 Nov 2007 21:59:11 +0100 (CET)
Date: Thu, 1 Nov 2007 21:59:11 +0100
From: Pavel Cahyna <pavel.cahyna@matfyz.cz>
To: arla-drinkers@stacken.kth.se
Subject: Re: towards getting netbsd 4 supported as well as 3 is
Message-ID: <20071101205910.GA25896@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="Dxnq1zWXvFF0Q93v"
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
--Dxnq1zWXvFF0Q93v
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
--Dxnq1zWXvFF0Q93v
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));
--Dxnq1zWXvFF0Q93v
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
--Dxnq1zWXvFF0Q93v--