Commit Graph

74 Commits

Author SHA1 Message Date
pooka 4d243cfc9d use generic getattr 2007-12-19 14:01:30 +00:00
pooka 21913eabe5 Rototill.
Ok, ok, a few more words about it: stop holding puffs_cc as a holy
value and passing it around to almost every possible place (popquiz:
which kernel variable does this remind you of?).  Instead, pass
the natural choice, puffs_usermount, and fetch puffs_cc via
puffs_cc_getcc() only in routines which actually need it.  This
not only simplifies code, but (thanks to the introduction of
puffs_cc_getcc()) enables constructs which weren't previously sanely
possible, say layering as a curious example.

There's still a little to do on this front, but this was the major
fs interface blast.
2007-11-30 19:02:28 +00:00
pooka 6a3d9a187d Remove "puffs_cid" from the puffs interface following l-removal
from the kernel vfs interfaces.  puffs_cc_getcaller(pcc) can be
used now should the same information be desired.
2007-11-27 11:31:17 +00:00
pooka 4462e9454f use puffs_daemon() instead of daemon() 2007-11-16 18:39:01 +00:00
pooka ec865a5b29 Actually, daemonize the file servers before mounting. I might require
at some point that the local protocol handler does not change after
the file system has been mounted.
2007-11-05 17:54:31 +00:00
pooka 4b0f2948e2 Pull the daemonizing code out of the library mainloop into the file
servers.  Calling daemon() (i.e. fork()ing) inside a library can
cause nice surprises for e.g. threaded programs.  As discussed with
Greg Oster & others.
2007-11-05 17:48:17 +00:00
pooka de3b90f940 add testing option -l, which causes the flush of the page cache of
the node under lookup (if found)
2007-10-11 23:03:00 +00:00
pooka ceb690c88e when removing file, free last block also 2007-10-11 13:50:42 +00:00
pooka 90900b0311 dtfs memsets all allocated block content to 0 immediately, so to
avoid wasting unbelievable amounts of memory, set the blocksize to
something more believable.  Should fix the memset-part to act only
up to the size the file is extended to, though.
2007-09-27 12:03:31 +00:00
pooka 059aa1fbbc fix usage. from Karl Jenkinson 2007-09-05 17:15:35 +00:00
pooka 25a346d4fb Nuke PUFFSLOOKUP_FOO and move to NAMEI_FOO 2007-08-15 14:19:19 +00:00
pooka 5b593f2aeb require standard mount_foo bar /path usage, where bar is ignored here 2007-08-09 21:54:27 +00:00
pooka e4b63c41f0 implement node_mmap and allow to specify accepted mappings on command line 2007-07-27 08:29:10 +00:00
pooka 27c5f7cba3 Match code with comment (can't really remember doing it often that
way around .. ) and initialize storage to zero when extending a file.
2007-07-22 13:19:38 +00:00
pooka a53b2cab5e missed one place to set dirent namelen - unmiss it 2007-07-22 12:26:58 +00:00
pooka 87429c840c Oops, the cookies for nfs of course represent the *next* directory
entry offset, not the current one.
2007-07-19 10:14:53 +00:00
pooka b4d2a683de -m for setting maxreqlen 2007-07-19 07:58:56 +00:00
pooka ce80f00ff3 With fullpath support we need to check name lengths also, otherwise
lookup for "foo" will match "foobar".
2007-07-17 16:33:27 +00:00
pooka 9ee5fb2795 nuke accidental debug printf 2007-07-17 16:00:56 +00:00
pooka 08db7d7534 * add mntfromname parameter to puffs_init()
* set it in file servers
2007-07-17 11:34:51 +00:00
pooka 3c01554a05 dtfs -f for PUFFS_KFLAG_LOOKUP_FULLPNBUF 2007-07-01 22:59:09 +00:00
pooka 6596e0c995 adapt: **newnode etc. pointers -> struct puffs_newinfo 2007-07-01 18:40:15 +00:00
pooka fe7bbdec69 adapt: pid -> const struct puffs_cid * 2007-07-01 17:23:44 +00:00
pooka 1776bc7796 adapt: pcn->pcn_cred is now a pointer 2007-07-01 15:32:02 +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 ae34899ec3 make getopt() actually accept -t also 2007-06-05 12:20:35 +00:00
pooka 1d9d9332f5 Use SETBACK_NOREF instead of SETBACK_INACT to control node removal.
Avoids one round of inactive (wheee!).
2007-05-18 15:53:07 +00:00
pooka 48d5a49e1f "support" vop_poll enough for testing purposes. In short, yield every
poll request for a few seconds before returning.
2007-05-18 13:55:21 +00:00
pooka 9550017a8d Adapt to changes with mounting file systems.
Introduce a parameter -r to control the root node type.  For example
"dtfs -r 'lnk /etc' /puffs" mounts dtfs with the root node as a
symbolic link to /etc:

jojonaru# ./dtfs -r 'lnk /etc' /puffs
jojonaru# ls -l /puffs
lrw-rw-rw-  1 root  wheel  4 May 17 14:06 /puffs -> /etc
jojonaru# cd /puffs
jojonaru# pwd
/etc
jojonaru#

Extra credit for figuring out how to unmount this file system with
umount(8).

Likewise, "dtfs -r 'chr 2 12' /puffs" makes /puffs (i386) /dev/zero etcetc.
2007-05-17 14:10:13 +00:00
pooka d583f4a1ec Unmount frequently requires some test code, so define it here as
a dummy instead of libpuffs to make plugging the test code in easier.
2007-05-07 17:22:50 +00:00
pooka 2893a07834 Default to inactive-on-demand, use inactive setback to request inactive
to be called for a removed node (for unix open file semantics).
2007-05-07 17:18:50 +00:00
pooka 2878c03588 mount with write-through page cache if command line -t is given 2007-04-22 18:03:18 +00:00
pooka 9a3c4f612c remove assertion now done in libpuffs 2007-04-20 08:29:28 +00:00
pooka 66efb94d3b use PUFFS_STORE_DCOOKIE 2007-04-17 11:43:32 +00:00
pooka 558edb1195 update usage 2007-04-16 13:52:38 +00:00
pooka 4609dd7023 lessen file handle size sanity checks: kernel does it already (mostly) 2007-04-16 13:25:09 +00:00
pooka b173dac692 adapt to kernel changes with file handles 2007-04-16 13:06:39 +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 3e65ff17b5 support nfs exporting dtfs 2007-04-11 21:07:54 +00:00
pooka c6d7dea8d5 use dev_t from puffs_node instead of duplicating it into
fs specific structures
2007-04-10 13:32:02 +00:00
pooka d99ec1ff38 g/c leftovers 2007-04-10 12:29:29 +00:00
pooka 4a480ffabb Allocate file memory in blocks instead of one big chunk. Makes
writing large files much cheaper since there's no longer a need to
realloc $lots of memory when the file grows.
2007-04-01 10:55:38 +00:00
pooka 27eb6005d2 reflect libpuffs change of puffs_access argument unification 2007-03-22 16:59:34 +00:00
pooka 4370dd6320 check puffs_access_{chmod,chown,times} in setattr 2007-03-21 19:56:49 +00:00
pooka 6d03fb0803 add support for permissions and file ownership 2007-03-20 18:30:30 +00:00
pooka 19dd9ef4ee don't shrink file size when writing to the middle of an existing file
(mandatory AsiaBSDCon live commit)
2007-03-11 10:08:37 +00:00
pooka d89ebe7462 * remove rogue header
* better variable name to avoid shadowing global symbol name
2007-02-27 22:03:45 +00:00
pooka 9c41498b0b PUFFS_ISDOTDOT -> PCNISDOTDOT 2007-02-15 12:52:30 +00:00
pooka c1b9179682 Avoid doing a ludicrous number of reallocs when the file grows by only
lazy extending the file in setattr and really extending it in write.
2007-01-28 10:47:36 +00:00