and before puffs_mount().
(this should actually be integrated with puffs_exit(), but that
routine is currently so non-sensible that I didn't bother now)
a) readdir cookies and eofflag
b) file handle routines.
File handle routines are REALLY ugly and are not stable, i.e.
the file handle will be lost if the file server goes byebye.
They probably should be redone to not use getfh(), but for nullfs
I wanted to make them the same as when the file system is accessed
without the null layer. Well, turns out it doesn't pass anyway
since the kernel adds the fsid tags for fhandle_t. Anyway, it's
useful for some limited hacking purposes, so I'll commit this
since it works .. kinda.
as needed to read a request instead of the maximum message size.
Insanely enough, this makes "cheap backend I/O" file systems such
dtfs and sysctlfs perform 10-30% better (depending on the average
size of incoming requests).
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.
them every time. Speeds up pure in-memory file systems such as
sysctlfs or dtfs quite a bit. For actual I/O-workhorses the result
is of course less tasty.
If the env variable PUFFS_COMFD is set, the descriptor value
contained in it is used for communication instead of opening
/dev/puffs and doing mount(2).
This feature is obviously very undocumented and should not be used
without adult supervision.