Commit Graph

62 Commits

Author SHA1 Message Date
christos 6b3f51ca99 there is no pflags, just flags. 2016-04-11 00:47:19 +00:00
wiz 0c9e1ca798 Bump date for previous.
filesystem -> file system
2015-02-16 10:48:34 +00:00
manu 8abab6b782 Add PUFFS_KFLAG_NOFLUSH_META to prevent sending metadata flush to FUSE
FUSE filesystems do not expect to get metadata updates for [amc]time
and size, they updates the value on their own after operations.

The PUFFS PUFFS_KFLAG_NOFLUSH_META option prevents regular metadata cache
flushes to the filesystem , and libperfuse uses it to match Linux FUSE
behavior.

While there, fix a bug in SETATTR: do not update kernel metadata cache
from SETATTR reply when the request is asynchronous, as we do not have
the reply yet.
2015-02-15 20:21:29 +00:00
riastradh 6cb10275d0 Merge riastradh-drm2 to HEAD. 2014-03-18 18:20:35 +00:00
wiz a5684d07dd Use Mt for email addresses. 2013-07-20 21:39:55 +00:00
wiz 9cdff3cdd6 Bump date for previous. 2012-08-16 11:28:48 +00:00
manu d256e38414 Fix regression that has been introduced when the lookup/reclaim race
condition was addressed in libpuffs by counting lookups.

The fix assumes that cookies map to struct puffs_cookie, which has not
been documented as a requirement for filesystems using libpuffs. As an
example, we got burnt by this assumption in libp2k (kern/46734), and
we fixed bit by actually mapping libp2k cookies to struct puffs_node.

It is unlikely, but there may be third party filesystems that use cookies
unmapped to struct puffs_node, and they were left broken for now.

- we introduce a puffs_init() flag PUFFS_FLAG_PNCOOKIE that let filesystems
inform libpuffs that they map cookies to struct puffs_node. Is that flag
is used, the lookup/reclaim race condition fix is enabled. We enable the
flag for libp2k.

- filesystems that use puffs_pn_new() obviouslty use struct puffs_node
and gain PUFFS_FLAG_PNCOOKIE automatically even if they did not specify
it in puffs_init(). This include all our PUFFS filesystem in-tree except
libp2k.

- for filesystems not willing to use struct puffs_node, we introduce a
reclaim2 vnop, which is reclaim with an additionnal lookup count argument.
This vnop let the filesystem implement the lookup/reclaim race fix on
its own.
2012-08-16 09:25:43 +00:00
wiz aceedc0215 Use more markup. New sentence, new line. Bump date for previous. 2012-08-10 21:00:45 +00:00
manu 2a9a80bb36 Add PUFFS_KFLAG_CACHE_DOTDOT so that vnodes hold a reference on their
parent, keeping them active, and allowing to lookup .. without sending
a request to the filesystem.

Enable the featuure for perfused, as this is how FUSE works.
2012-08-10 16:49:35 +00:00
wiz d2ca09c94d Bump date for previous.
New sentence, new line; remove trailing whitespace; fix typos;
punctuation nits.
2012-04-18 14:24:26 +00:00
manu 70d8192475 - When using PUFFS_KFLAG_CACHE_FS_TTL, do not use puffs_node to carry
attribute and TTL fora newly created node. Instead extend puffs_newinfo
  and add puffs_newinfo_setva() and puffs_newinfo_setttl()
- Remove node_mk_common_final in libperfuse. It used to set uid/gid for
  a newly created vnode but has been made redundant along time ago since
  uid and gid are properly set in FUSE header.
- In libperfuse, check for corner case where opc = 0 on INACTIVE and   RECLAIM (how is it possible? Check for it to avoid a crash anyway)
- In libperfuse, make sure we unlimit RLIMIT_AS and RLIMIT_DATA so that
  we do notrun out of memory because the kernel is lazy at reclaiming vnodes.
- In libperfuse, cleanup style of perfuse_destroy_pn()
2012-04-18 00:57:21 +00:00
wiz 72e34f2f4a Split file system.
Comma fixes.
Remove dangling "and".
Bump date for previous.
2012-04-08 16:09:55 +00:00
manu fb4eb35384 Add PUFFS_KFLAG_CACHE_FS_TTL flag to puffs_init(3) to use name and
attribute cache with filesystem provided TTL.
lookup, create, mknod, mkdir, symlink, getattr and setattr messages
have been extended so that attributes and their TTL can be provided
by the filesytem. lookup, create, mknod, mkdir, and symlink messages
are also extended so that the filesystem can provide name TTL.
The filesystem updates attributes and TTL using
puffs_pn_getvap(3), puffs_pn_getvattl(3), and puffs_pn_getcnttl(3)
2012-04-08 15:07:45 +00:00
njoly f5d424631e Remove obsolete puffs_suspend(3) xref. 2011-12-26 17:59:07 +00:00
manu bd5d68a6d1 Documentation fix
Evgeniy Ivanov <lolkaantimat@gmail.com>
2011-11-24 01:59:25 +00:00
pooka b95be6c682 Add convenience routine puffs_unmountonsignal(), which does exactly that. 2010-01-12 18:42:38 +00:00
pooka 229bf1afc9 Remove the paragraph saying interfaces will change without warning.
Note that a stable version of puffs first appeared in NetBSD 5.0.
2009-02-20 14:26:56 +00:00
pooka 41f31dac6d add:
puffs_setspecific(pu, private)
	Can be used to set the specific data after the call to
	puffs_init().
2008-12-12 18:59:53 +00:00
pooka 462f2a64a0 note that puffs_daemon() must be called *before* puffs_mount() 2008-11-14 13:27:24 +00:00
pooka e489c3824a fix typographical snafu 2008-11-14 13:10:13 +00:00
pooka 8591ab211b Add AsiaBSDCon 2008 paper to SEE ALSO. 2008-09-06 12:39:49 +00:00
pooka ff42332733 Replace void * by puffs_cookie_t where appropriate. No functional change. 2008-08-12 19:44:39 +00:00
wiz 682d8063bf Remove trailing whitespace. 2008-05-25 19:38:14 +00:00
pooka d1d05d65b9 Implement lazy contexts for file systems using puffs_mainloop().
Previously each request was executed on its own callcontext and
switched to every time the request was being processed.  Now requests
borrow the mainloop context and switch only if/when they yield.
This takes two context switches away from a file system request
bringing down the typical amounts 2->0 (e.g. dtfs) and 4->2 (e.g.
psshfs).

The interfaces for manually executing requests changed a bit:
puffs_dispatch_create() and puffs_dispatch_exec() must now be used.
They are not tested, as nothing in-tree wants them and I doubt
anyone else is really interested in them either.

Also do some misc code cleanup related to execution contexts.  The
"work-in-progress checkpoint" committed over a year ago was starting
to look slightly weed-infested.
2008-01-28 18:35:49 +00:00
pooka d7412d56b1 Introduce PUFFS_STACKSIZE_MIN to avoid overloading 0 and getting
a warning from the library when really wanting to say "just the
minimum, please".
2008-01-14 13:57:26 +00:00
pooka 049d39b202 document puffs_dopufbuf 2007-12-15 20:11:38 +00:00
pooka 61113f40fd Part 3/n of extensive changes to message handling:
Get rid of the original puffs_req(3) framework and use puffs_framebuf(3)
instead for file system requests.  It has the advantage of being
suitable for transporting a distributed message passing protocol
and therefore us being able to run the file system server on any
host.

Ok, puffs is not quite here yet: libpuffs needs to grow request
routing support and the message contents need to be munged into a
host independent format.  Saying which format would be telling,
but it might begin with an X, end in an L and have the 13th character
in the middle.  Keep an eye out for the sequels: Parts 3+m/n.
2007-12-04 21:24:10 +00:00
wiz 0b6ffdfedb Fix a typo that has migrated across files. 2007-12-01 19:18:49 +00:00
wiz 8498f992c4 Typo fixes. 2007-12-01 18:53:28 +00:00
pooka 3537e99eb1 Introduce puffs_daemon(), which works like daemon(3) except that it
also synchronizes with puffs_mount() and does not return (exit) in the
parent process until the file system has been mounted.  This makes
it possible to reliably run e.g. mount_foo jippi /kai ; cd /kai/ee
2007-11-16 18:35:10 +00:00
pooka a02fe51bef Open the kernel descriptor as part of mount(), not init(). Then
it doesn't matter if someone fork()s or does other tricks between
init() and mount() (and besides, now it's where it logically should be).
2007-11-06 15:09:07 +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 c8c5d830fc SEE ALSO paper 2007-10-05 00:04:59 +00:00
pooka 12e401bc1a Add refuse paper to SEE ALSO 2007-09-24 00:22:25 +00:00
pooka 91872d550d xref refuse, don't bump date 2007-09-03 12:34:21 +00:00
pooka 9651f40228 update 2007-07-18 22:23:37 +00:00
pooka 1451f0dabb document PUFFS_KFLAG_LOOKUP_FULLPNBUF 2007-07-05 22:42:14 +00:00
pooka 8bfc66776f document KFLAG_NOCACHE{_PAGE,_NAME,} 2007-06-24 22:32:00 +00:00
pooka ae3221667f reflect today's mount changes 2007-05-17 15:21:14 +00:00
pooka 291fe845cd Step 3 and currently final step of a more general purpose event loop:
support removal and addition of i/o file descriptors on the fly.

* detect closed file descriptors
* automatically free waiters of a dead file descriptor
* give the file server the possibility to specify a callback which
  notifies of a dead file descriptor
* move loop function to be a property of the mainloop instead of
  framebuf (doesn't change effective behaviour)
* add the possibility to configure a timespec parameter which
  attempts to call the loop function periodically
* move the event loop functions from the puffs_framebuf namespace
  to puffs_framev to differential between pure memory management
  functions
2007-05-15 13:44:46 +00:00
pooka 19db57c596 List all current ways to write a file system. Also, add a reference
to puffs_req(3) for the manual operation case.
2007-05-09 18:24:11 +00:00
pooka e5a894536c document PUFFS_KFLAG_WTCACHE and PUFFS_KFLAG_IAONDEMAND 2007-05-09 13:54:08 +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 aaf5af07be Move file system and node callbacks into their own manual page.
Improve markup and descriptions a bit (not completely finished yet).
2007-04-16 19:16:02 +00:00
pooka 0d032531d1 document new interfaces 2007-04-16 16:37:02 +00:00
pooka fdd8f87db5 document accessor routines added when making struct puffs_usermount
implementation private
2007-04-12 21:45:29 +00:00
pooka 406a946463 document credentials & access control methods 2007-03-22 17:38:09 +00:00
pooka a1e98c19f2 match puffs_node_access prototype with reality 2007-03-20 18:25:56 +00:00
pooka ec2d43895a add puffs paper presented at AsiaBSDCon 2007 to "SEE ALSO" 2007-03-13 17:06:10 +00:00
pooka f7a084b3b0 Nm the manual puffs instead of libpuffs 2007-02-08 05:24:36 +00:00