[3983] in arla-drinkers

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

Re: nnpfs/xfs tutorial

daemon@ATHENA.MIT.EDU (Tomas Olsson)
Fri Jul 14 13:51:42 2006

From arla-drinkers-bounces@stacken.kth.se Fri Jul 14 17:51:42 2006
Return-Path: <arla-drinkers-bounces@stacken.kth.se>
Delivered-To: arla-drinkers-mtg@bloom-picayune.mit.edu
Received: (qmail 14473 invoked from network); 14 Jul 2006 17:51:42 -0000
Received: from mx2.kth.se (130.237.48.98)
  by charon.mit.edu with SMTP; 14 Jul 2006 17:51:42 -0000
Received: from localhost (localhost.localdomain [127.0.0.1])
	by mx2.kth.se (Postfix) with ESMTP id 69998140D92;
	Fri, 14 Jul 2006 19:51:41 +0200 (CEST)
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 10970-01-2; Fri, 14 Jul 2006 19:51:39 +0200 (CEST)
Received: from tapas.stacken.kth.se (tapas.stacken.kth.se [130.237.234.140])
	by mx2.kth.se (Postfix) with ESMTP id 505A01405D1;
	Fri, 14 Jul 2006 19:51:39 +0200 (CEST)
Received: from tapas.stacken.kth.se (localhost [127.0.0.1])
	by tapas.stacken.kth.se (Postfix) with ESMTP id 17796534FC;
	Fri, 14 Jul 2006 19:51:39 +0200 (CEST)
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 D3316534FC
	for <arla-drinkers@tapas.stacken.kth.se>;
	Fri, 14 Jul 2006 19:51:36 +0200 (CEST)
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 k6EHpa0V004944
	for <arla-drinkers@stacken.kth.se>;
	Fri, 14 Jul 2006 19:51:36 +0200 (MET DST)
Received: from localhost (localhost.localdomain [127.0.0.1])
	by mx1.kth.se (Postfix) with ESMTP id EE4CC140FE8
	for <arla-drinkers@stacken.kth.se>;
	Fri, 14 Jul 2006 19:51:35 +0200 (CEST)
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 07205-01-31; Fri, 14 Jul 2006 19:51:34 +0200 (CEST)
Received: from kashyyyk.ite.kth.se (kashyyyk.ite.kth.se [130.237.31.35])
	by mx1.kth.se (Postfix) with ESMTP id 5E5BC140E33;
	Fri, 14 Jul 2006 19:51:34 +0200 (CEST)
Received: by kashyyyk.ite.kth.se (Postfix, from userid 18404)
	id 5363C89C822; Fri, 14 Jul 2006 19:51:34 +0200 (CEST)
From: Tomas Olsson <tol@stacken.kth.se>
To: Kristaps Johnson <kristaps@gradient-enterprises.com>
Subject: Re: nnpfs/xfs tutorial
References: <Pine.LNX.4.64.0606201605200.5425@cycle0.hinterlands.net>
	<Pine.LNX.4.64.0607141122290.3884@cycle0.hinterlands.net>
Date: 14 Jul 2006 19:51:34 +0200
In-Reply-To: <Pine.LNX.4.64.0607141122290.3884@cycle0.hinterlands.net>
Message-ID: <lsrejwom5w9.fsf@kashyyyk.ite.kth.se>
Lines: 69
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: 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

Kristaps Johnson <kristaps@gradient-enterprises.com> writes:
> I've made the documentation and sources available here:
> http://sysjail.bsd.lv/xfsskel
> 
Great! I'll take a look.

>   - Precise definition of tokens & their purpose?
>
Well, I'm not totally sure what the original intent was, but they are used
by nnpfs to ask for "rights" to operate on data/attributes -- normal read,
normal write.  The daemon then tells nnpfs it's current authority, and
occasionally that it has been revoked (due to a callback for example).
 
Some tokens are never used (lock, attr_w, shared read, etc) and are not
implemented.  In practice, ATTR_R means we have valid attributes, DATA_R
means we have a valid data handle, and DATA_W means we also are allowed to
modify the data depending on user rights etc.

>   - Precise definition of pag/cred and its purpose?
>
A PAG is a "process authentication group", we use it as a number
identifying the set of credentials to use for the operation.  You start off
with a default one.  Later on, a process may create a new PAG which all its
children inherit (until they possibly create new PAGs).

Anyway, for each PAG you may have different sets of credentials, allowing
you to work as tol@KTH.SE in one terminal and as tol@SU.SE in another. Both
with the same local account "kristaps" :)

>   - struct installdata.offset and its purpose?
>
We have valid data from the beginning of the file and up to offset.
Command like `head' and `file' are fast, `tail' still has to fetch the
entire file.

>   - xfs_message_create.mode vs. xfs_message_create.attr.mode?
>
xfs_message_create.mode is not used.  Maybe it was meant to be used as open
mode (or token)?  I dunno.

>   - NNPFS_MSG_UPDATEFID?
>
"The node you think is `old_handle' really has `new_handle', change it."

We have an option to defer the (expensive) lookup of mountpoints, we just
lie about them (including the fid) until the user asks for the truth.  It
can also be used for disconnected operation.  If you "create" a file while
offline you won't get the real fid until the file is created for real when
network access is back up.

> NNPFS_MSG_WAKEUP_DATA?
>
A wakeup with a data buffer. Think pioctl replies.

(In my hacking branch I removed it).

>  NNPFS_MSG_COUNT?
>
"Number of valid message opcodes", the highest opcode + 1.

>   - xfs_message_bulkgetnode?
>
Hm.  I don't have that.  Could be useful for windows readdir where you need
the statinfo for all the nodes, too.  Or color-ls...

Is it an OpenBSD invention, or did it use to be in mainline?  I know people
have talked about it.

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

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