Commit Graph

52 Commits

Author SHA1 Message Date
pooka
7faf2bccbe Add puffs_setback(), which can be used to set setbacks for nodes before
the call returns to the kernel.  Currently it can be called only from
open(), mmap(), remove() and rmdir().  (But that might change)
2007-05-07 17:16:07 +00:00
pooka
a5f3fa93dc Remove the user-specified argument for the framebuf loop callback.
It can be generated through other means if it is desired.
2007-05-06 10:21:45 +00:00
pooka
b223c403fc Add puffs "frame buffers", which are an abstraction of the buffering
and event handling mechanisms required in file servers with blocking
I/O backends.  puffs_framebuf is built on the concept of puffs_cc
and uses those to multiplex execution where needed.

File systems are required to implement three methods:
  * read frame
  * write frame
  * compare if frame is a response to the given one

Memory management is provided by puffs_framebuf, but the file
systems must still, of course, interpret the protocol and do e.g.
byte order conversion.

As always, puffs_framebuf is work in progress.  Current users are
mount_psshfs and mount_9p.
2007-05-05 15:48:18 +00:00
pooka
5fac7361cf Introduce PUFFS_FLAG_HASHPATH, which for PUFFS_FLAG_BUILDPATH file servers
creates a hash of the node's path into po->po_hash to avoid a full pathcmp
every time.
2007-05-01 15:58:00 +00:00
pooka
9601d4d304 use more accurate flag masking 2007-04-22 18:02:44 +00:00
pooka
5d86889ea0 add puffs_cc_getspecific(pcc), which is shorthand for:
puffs_getspecific(puffs_cc_getusermount(pcc))
2007-04-19 14:45:03 +00:00
pooka
eeff4f8efe Introduce PUFFS_STORE_DCOOKIE, which stores a directory cookie for a
given offset iff the directory read in question wants cookies.
2007-04-17 11:42:14 +00:00
pooka
d1667bb48c alloc to set flags when setting fhsize 2007-04-16 13:04:49 +00:00
pooka
fca427389c some routines for setting mount parameters 2007-04-16 08:28:55 +00:00
pooka
37dd7942fc Instead of keeping on adding parameters to puffs_mount(), make it
only take the bare essentials, which currently means removing
"maxreqlen" from the argument list (all current callers I'm aware
of set it as 0 anyway).  Introduce puffs_init(), which provides a
context for setting various parameters and puffs_domount(), which
can be used to mount the file system.  Keep puffs_mount() as a
shortcut for the above two for simple file systems.

Bump development ABI version to 13.  After all, it's Friday the 13th.
Watch out!  Bad things can happen on Friday the 13th. --No carrier--
2007-04-13 13:35:46 +00:00
pooka
95a18d20b9 Hide struct puffs_usermount from the rest of the world and provide
accessors for interesting data in it.  Namely, you can now get
pu->pu_privdata with puffs_getspecific(), pu->pu_pn_root with
puffs_set/getroot() and pu->pu_maxreqlen with puffs_getmaxreqlen().
2007-04-12 15:09:00 +00:00
pooka
6b7023f08f * support nodetofh and fhtonode callbacks
* use new signature of node_readdir
2007-04-11 21:04:51 +00:00
pooka
6cc35b910e support page cache flushing 2007-04-06 17:49:11 +00:00
pooka
fa10fe8f9f implement puffs_inval_pagecache_node_range() 2007-04-06 16:38:03 +00:00
pooka
d28a42812b unify the location of *pcr in puffs_access_* 2007-03-22 16:57:27 +00:00
pooka
c3a2affb84 * return -1 and set errno instead of returning errno directly
* introduce puffs_cred_isregular() which checks if the cred structure
  has regular uid/gid (i.e. "person" credentials and not kernel creds)
2007-03-22 15:32:22 +00:00
pooka
1d029cc056 remove variable names from header 2007-03-22 14:22:08 +00:00
pooka
0f28e7c1d1 add routiens which check against ufs semantics for permission to
chown, chmod and change a/mtime
2007-03-21 19:55:55 +00:00
pooka
1ba4b810d1 implement counterpart of vaccess() 2007-03-20 18:28:08 +00:00
pooka
5c0f0bcf80 initial support for cacheops 2007-03-20 10:22:22 +00:00
pooka
2df275c4cd va->va_mode doesn't contain the full argument to the mknod() system call,
so introduce puffs_addvtype2mode() and use that in null.c to generate the
proper syscall argument
2007-03-16 08:14:49 +00:00
pooka
7fea503eb4 Introduce puffs_path_walkcmp(), which is to be called from nodewalk
and compares the path of the node against the given pathobject.
Also make comparison method take a flag to indicate if it should
check if the second path is a true prefix of the first.

plus some namespace cleanup
2007-02-15 17:04:46 +00:00
pooka
a32e39e624 * get rid of the holy kernel-given ISDOTDOT, and instead define a
macro which does strcmp against ".." and (the untranslated)
  componentname
* make PUFFS_FLAG_BUILDPATH build paths also if dotdot is the case,
  and adapt the regular path objects to this
* make nullfs lookup readable because we can now get rid of dotdot
  processing there
2007-02-15 12:51:45 +00:00
pooka
d83ed90176 add interfaces for suspending the file system 2007-01-26 23:00:33 +00:00
pooka
288823a738 Be consistent with the rest of the framework about the argument
order of puffs_docc and puffs_dopreq
2007-01-20 14:37:06 +00:00
pooka
84e83df1bb be consistent in naming request handlers 2007-01-20 13:52:14 +00:00
pooka
c068d370f2 revoke revoke 2007-01-16 22:37:17 +00:00
pooka
05861b929d Checkpoint some more work in progress: for the benefit those file
system backends which operate purely based on paths, push out more
path management into the library and make path management more
abstract: enable a file system to define a bunch of path management
callbacks, which are used by the framework.  Management of normal
/this/is/a/path type paths is provided by the library.
2007-01-15 00:39:02 +00:00
pooka
a3d07fb3e9 implement fsync 2007-01-11 17:48:21 +00:00
pooka
e639bec8c2 Add preliminary code for a nullfs layer, which can be used to mount
a directory hierarchy to another point, just like with the kernel
nullfs.  This is not really a layering scheme yet, but it should
evolve into one.  Currently it can just be used to do 1:1 mapping.
2007-01-11 01:01:55 +00:00
pooka
2811d45fdd Be less shy about the default stack size, it's a only virtual memory space.
TODO: put a guard page at the end
2007-01-10 20:11:04 +00:00
pooka
71ddd8df08 rename name cache invalidation interface to be in sync with the
kernel operation names, i.e. contain "namecache" instead of just "name"
2007-01-09 18:19:01 +00:00
pooka
03a190dc22 lib interface for invalidation routines 2007-01-09 18:15:08 +00:00
pooka
7cc096d8ec * get rid of the mount callback; it's no great surprise to the
server that it needs to mount the file system backend if it wants
  to call mount
* provide some options for getmntopts(), assume that callers will parse
  command line (or fstab) args
* reorganize the puffs_cc interface just a bit, preparing for a bigger
  revamp later
2007-01-06 18:22:09 +00:00
pooka
f70a3c8c19 * inform kernel of our version
* homegrown lib ABI check (to avoid bumping major a ludicrillion times
  before reaching stability)
2007-01-02 15:53:05 +00:00
pooka
184a7d787c checkpoint some experimental work-in-progress, namely:
Add support for having multiple outstanding operations.  This is done
by exposing enough interfaces so that it is convenient to have the
main event loop in the implementation itself and by providing a
continuation framework for convinient blocking and rescheduling.

works fine, but will undergo further cleanup & development
2006-12-29 15:28:11 +00:00
pooka
49df5bfc7b outline & export code for interfacing with kernel GET/PUT requests 2006-12-07 23:15:20 +00:00
pooka
43d8340ec6 support mmap 2006-12-07 16:59:14 +00:00
pooka
55544f739a rototill the operation callbacks: unify the ops under struct puffs_ops
and namespace them
2006-12-07 10:53:21 +00:00
pooka
0d5746a9ac PUFFSFLAG -> PUFFS_FLAG to be consistent with the kernel 2006-12-01 12:50:06 +00:00
pooka
c145fb5a17 summon daemon(3) in mainloop unless the nodaemon flag is given 2006-11-30 05:37:48 +00:00
pooka
4b5bf45935 const coherence 2006-11-23 16:44:28 +00:00
pooka
194d17d824 mode_t to enum vtype conversion 2006-11-21 23:11:09 +00:00
pooka
d69d91cf3e * call statvfs() at mount() time, pass that info along
* start is gone
2006-11-18 12:40:35 +00:00
pooka
a0e314dc77 shuffle flags a bit 2006-11-17 17:48:32 +00:00
pooka
a40549faca namespace previous change under puffs_vfsnop to avoid confusions 2006-11-14 11:45:03 +00:00
pooka
2d9b770ec5 implement unmount, sync and statvfs as dummies for file system which
couldn't care less about implementing them
2006-11-14 11:23:44 +00:00
pooka
80ce20607e * catch up with kernel changes
* better error handling when mounting
2006-11-09 13:11:01 +00:00
pooka
010234739c * support FAF (Fire-And-Forget) class operations
* adapt to new lookup
2006-11-07 22:10:53 +00:00
pooka
1fc270ecf0 pass rdev for specfs support 2006-10-26 22:53:01 +00:00