Subject: CVS commit: src/usr.sbin/puffs/mount_9p
To: None <source-changes@NetBSD.org>
From: Antti Kantee <pooka@netbsd.org>
List: source-changes
Date: 04/22/2007 18:10:48
Module Name:	src
Committed By:	pooka
Date:		Sun Apr 22 18:10:48 UTC 2007

Modified Files:
	src/usr.sbin/puffs/mount_9p: ninepuffs.c ninepuffs.h node.c

Log Message:
Alter the strategy for reading/writing a bit.  First of all, use
PUFFS_KFLAG_WTCACHE.  Second, create separate fids for reading and
writing.  If opening for read, open a read-only fid and for write
a write-only fid; use these for reading and writing.  When the
open-count for a node drops to zero, clunk both.  This avoids hitting
the fid limit when accessing large directory hierarchies.

Two problems remain:
* does not take credentials into account, although we can only mount
  the remote 9P file server with one set of credentials, so not a
  huge worry
* doesn't work for the open/mmap/close/access_memory_window case, but
  that will require some further kernel changes


To generate a diff of this commit:
cvs rdiff -r1.1 -r1.2 src/usr.sbin/puffs/mount_9p/ninepuffs.c \
    src/usr.sbin/puffs/mount_9p/ninepuffs.h \
    src/usr.sbin/puffs/mount_9p/node.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.