[4165] in arla-drinkers
Arla on FreeBSD
daemon@ATHENA.MIT.EDU (Tomas Olsson)
Thu Feb 15 05:16:11 2007
From arla-drinkers-bounces@stacken.kth.se Thu Feb 15 10:16:11 2007
Return-Path: <arla-drinkers-bounces@stacken.kth.se>
Delivered-To: arla-drinkers-mtg@bloom-picayune.mit.edu
Received: (qmail 21537 invoked from network); 15 Feb 2007 10:16:11 -0000
Received: from mx2.kth.se (130.237.48.98)
by charon.mit.edu with SMTP; 15 Feb 2007 10:16:11 -0000
Received: from localhost (localhost.localdomain [127.0.0.1])
by mx2.kth.se (Postfix) with ESMTP id 3BB4014061B;
Thu, 15 Feb 2007 11:16:10 +0100 (CET)
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 14971-03-52; Thu, 15 Feb 2007 11:16:07 +0100 (CET)
Received: from tapas.stacken.kth.se (tapas.stacken.kth.se [130.237.234.140])
by mx2.kth.se (Postfix) with ESMTP id DC71C14062C;
Thu, 15 Feb 2007 11:16:05 +0100 (CET)
Received: from tapas.stacken.kth.se (localhost [127.0.0.1])
by tapas.stacken.kth.se (Postfix) with ESMTP id A3281534FE;
Thu, 15 Feb 2007 11:16:05 +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 6AADD534FE
for <arla-drinkers@tapas.stacken.kth.se>;
Thu, 15 Feb 2007 11:16:03 +0100 (CET)
Received: from mx2.kth.se (mx2.kth.se [130.237.48.98])
by brev.stacken.kth.se (8.12.10/8.12.10) with ESMTP id l1FAG2OA004860
for <arla-drinkers@stacken.kth.se>;
Thu, 15 Feb 2007 11:16:03 +0100 (MET)
Received: from localhost (localhost.localdomain [127.0.0.1])
by mx2.kth.se (Postfix) with ESMTP id BB31E14061B
for <arla-drinkers@stacken.kth.se>;
Thu, 15 Feb 2007 11:16:02 +0100 (CET)
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 16277-03-17; Thu, 15 Feb 2007 11:16:00 +0100 (CET)
Received: from kashyyyk.ite.kth.se (kashyyyk.ite.kth.se [130.237.31.35])
by mx2.kth.se (Postfix) with ESMTP id 6807F140584;
Thu, 15 Feb 2007 11:16:00 +0100 (CET)
Received: by kashyyyk.ite.kth.se (Postfix, from userid 18404)
id 58CF189CA62; Thu, 15 Feb 2007 11:16:00 +0100 (CET)
From: Tomas Olsson <tol@it.su.se>
To: Kostik Belousov <kostikbel@gmail.com>
Subject: Arla on FreeBSD
References: <a969fbd10702130839j727d055bu10c3ec80e38d2a3d@mail.gmail.com>
<6FC9F9894A9F8C49A722CF9F2132FC2204C9DAB5@ms05.mailstreet2003.net>
<6FC9F9894A9F8C49A722CF9F2132FC2204C9DAB6@ms05.mailstreet2003.net>
<45D1F30A.6080403@freebsd.org> <eqsut3$6a3$1@sea.gmane.org>
<20070213192906.U726@chrishome.localnet>
<20070214162938.GA96725@keira.kiwi-computer.com>
<20070214173211.L1054@chrishome.localnet>
<20070214170808.GC96725@keira.kiwi-computer.com>
<lsrvei45pq1.fsf@kashyyyk.ite.kth.se>
<20070215044707.GA39168@deviant.kiev.zoral.com.ua>
Date: 15 Feb 2007 11:16:00 +0100
In-Reply-To: <20070215044707.GA39168@deviant.kiev.zoral.com.ua>
Message-ID: <lsrmz3f680v.fsf_-_@kashyyyk.ite.kth.se>
Lines: 47
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3
MIME-Version: 1.0
X-Virus-Scanned: by amavisd-new at kth.se
X-Spam-Status: No, hits=-4.9 tagged_above=-200.0 required=5.0 tests=BAYES_00
X-Spam-Level:
Cc: freebsd-fs@freebsd.org, arla-drinkers@stacken.kth.se
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>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: arla-drinkers-bounces@stacken.kth.se
Errors-To: arla-drinkers-bounces@stacken.kth.se
X-Virus-Scanned: by amavisd-new at kth.se
Kostik Belousov <kostikbel@gmail.com> writes:
> > I'm already funded and can work full time on this, but a FreeBSD hacker
> > would help a lot. Any volunteers?
>
> Sorry for me pointing out obvious, why not continue to use fs@ as place
> where to ask ?
>
You're very right, I'm just to shy to do it... Thanks.
Anyway;
Arla is built around a "small" caching fs driver (nnpfs) servicing user
requests by asking the 'arlad' daemon for help or just operating on local
files created/fetched by arlad. They communicate over a char device.
A simple read would be handled as such:
getnode/getdata rpc to arlad
installnode/installdata + wakeup msgs from arlad
VOP_READ() on newly fetched cache file
Subsequent reads on the same data would skip the rpc part, unless arlad has
invalidated the node.
Previously, there was a 1:1 mapping between nnpfs vnode and cache file. The
installdata message was then handled by fetching the cache file's vnode (in
arlad's context), storing it in the nnpfs_node for future reference/access.
Now we ended up with one cache file per "block" (large) of data, and
decided that it would be better to open/access/close the cache "block" file
on each access. The closest we could get to the olden ways was to open the
directory where a node's cache blocks reside, in arlad's context.
The interesting part is how we open and access the cache files, and from
what context. arlad is in chroot() to avoid recursive lookups across /, and
it seems like a good idea to avoid such lookups now too.
So the main question is how to properly do VOP_{LOOKUP,CREATE,WRITE} etc on
cache files in this dual context world, without mixing identities in bad
ways or confusing the OS too much.
The currently messed up code lives in
http://cvsweb.stacken.kth.se/cvsweb.cgi/arla/nnpfs/bsd/
Most interesting is nnpfs_vnodeops-common.c (nnpfs_write_common()) and
nnpfs_blocks.c (open_file())
thanks
/t
_______________________________________________
Arla-drinkers mailing list
Arla-drinkers@stacken.kth.se
https://lists.stacken.kth.se/mailman/listinfo/arla-drinkers