nnpfs/xfs tutorial

Kristaps Johnson kristaps at gradient-enterprises.com
Fri Jul 14 18:41:58 CEST 2006


Hello, everybody.  In writing a file-system atop nnpfs, I had some trouble 
sifting generic file-system operations from the arlad codebase.  In order 
to properly understand the interface, I built my own skeleton 
implementation with plentiful nnpfs documentation.

This references an arla-drinkers thread:
https://lists.stacken.kth.se/pipermail/arla-drinkers/2006-June/003959.html

I've made the documentation and sources available here:
http://sysjail.bsd.lv/xfsskel

I invite everybody familiar with the nnpfs system to tear through the 
documentation and code so that new-comers interfacing nnpfs needn't have 
the same overhead.  Wheels & pavement, etc.

There will be errors and there will be omissions.  Since I'm using xfsskel 
as my own learning tool for another project, I have lots of time to make 
corrections and additions.  Spare no criticism but keep in mind that the 
code itself is not built to be productive: in deference to brevity I've 
explicitly avoided doubling functions (like sending an OPEN request into 
GETDATA) and writing a nice node cache (among other happy things).  The 
documentation is what concerns me more.

xfsskel has its share of quirks that I've not fully ironed out.  These are 
detailed in `TODO', but in brief:

  - `ls -l' shows symlink sourcefile data, not the path
  - echo foo > some_file fails, while echo foo >> some_fail works

And so on.  Some questions are also included there.  For example:

  - Precise definition of tokens & their purpose?
  - Precise definition of pag/cred and its purpose?
  - struct installdata.offset and its purpose?
  - xfs_message_create.mode vs. xfs_message_create.attr.mode?
  - NNPFS_MSG_UPDATEFID?  NNPFS_MSG_WAKEUP_DATA?  NNPFS_MSG_COUNT?
  - xfs_message_bulkgetnode?

N.B.  As mentioned in the docs, I developed xfsskel on OpenBSD.  This has 
the disadvantage of working with an old version of nnpfs with lots of 
"xfs" references (hence "xfsskel").  I'll be porting this soon and will 
relegate the choice-logic to autoconf.

When xfsskel and its documentation are complete, I'd like them to have the 
following properties:

  - Fully working file-system (with all operations).
  - Fully documented kernel messages (all struct fields).
  - Fully documented common fields (cred, offset, etc.).
  - Well-described concepts (nodes, data transfer, etc.).

Thank you for any help!  Take care,
   Kristaps


More information about the Arla-drinkers mailing list