Commit Graph

21 Commits

Author SHA1 Message Date
pooka 8023454664 Instead of requesting various pieces of information from node-creating
methods using "please fill me"-pointers, pass "struct puffs_newinfo *"
and provide methods to fill in new node info.
2007-07-01 18:39:39 +00:00
pooka ffe0a01441 Instead of supplying a plain pid, supply an abstract struct puffs_cid *,
which can currently be used to query the pid and lwpid.
2007-07-01 17:22:13 +00:00
pooka 0f53ecfb54 fold in common code for node creation. no functional change. 2007-06-25 07:52:01 +00:00
pooka c3942902c4 Since we locate in-memory nodes based on the inode number, stat a
file always after creation to cache the inode number given by the
backend file system.  Otherwise we would not find a newly created
node from incore and create another one.  In practise this was
pretty well hidden by the kernel name cache.
2007-06-24 23:02:55 +00:00
pooka 159e84cbd3 Introduce puffs_null_setops(), which initializes the ops vector with
puffs nullfs ops.
2007-06-24 18:42:25 +00:00
pooka 564336f084 Introduce puffs_pn_remove() to signal that a node has been deleted
and destroyed, but not yet reclaimed.  This prevents puffs_pn_nodewalk()
from returning stale entries.  Make nullfs use this (some file
systems are a bit too happy with recycling inode numbers).
2007-06-24 17:55:07 +00:00
pooka 86e63e7e27 don't return errno from a function which returns an fd - there's
a "little" room for confusion.  instead, return -1 and let the
caller grab errno.
2007-06-24 17:41:09 +00:00
pooka f8326bf98e Move puffs to a two clause license where it already isn't so. And
as agc pointed out, even files with the third clause were already
effectively two clause because of a slight bug in the language...
2007-06-06 01:54:59 +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 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 b93b025715 return errno instead of -1 if file is not present in lookup 2007-03-16 07:43:14 +00:00
pooka d695eff80f Create in-memory nodes only per unique inode, not unique pathname.
Solves problem with e.g. cache coherency of hardlinked files.
2007-03-13 17:05:23 +00:00
pooka 76fead3a3e Readlink should place the length of the link (without terminating
nul) in the length field.  Make it so.
2007-02-15 19:33:51 +00:00
pooka 09156a1e18 use puffs_path_walkcmp() instead of a homegrown comparison routine 2007-02-15 17:05:25 +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
agc 9715dfff81 If we can't set the attributes when making the directory, use rmdir to
remove the directory, not unlink.
2007-01-27 11:49:44 +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 b599bb507d * do the l-variations of syscalls, since some nodes are symlinks
* truncate only regular files to set size
* do the chmod()-dance for cache flush to now write-protected files
  until I can think of a nicer way to solve this
2007-01-11 14:59:35 +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