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.
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.
anymore do this if we fail to set size.
The whole lookup procedure should be done in a smarter fashion,
but this is the quickie fix to get things working again.
equal, larger, respectively instead of 0/1 for non/equal. This
will allow sorting the buffers for faster matching in libpuffs.
While here, change the name from respcmp to framecmp, as that better
reflects the purpose.
NOTE! there is no obvious way to make compilation fail for file
systems which may already be using this feature (although I don't
think there are any outside our tree, as the feature is two weeks
old). Nevertheless, non-updated file systems will fail very quickly.
correctly, otherwise the file server will attempt a conversion.
Specifically, if the directory bit is not set when changing the
permissions for a directory, a conversion from directory to regular
file would be attempted and naturally it being unsupported the
whole chmod would fail. So supply the file type as part of the
file mode.
PUFFS_KFLAG_WTCACHE. Second, create separate fids for reading and
writing. If opening for read, open a read-only fid and for write
a write-only fid; use these for reading and writing. When the
open-count for a node drops to zero, clunk both. This avoids hitting
the fid limit when accessing large directory hierarchies.
Two problems remain:
* does not take credentials into account, although we can only mount
the remote 9P file server with one set of credentials, so not a
huge worry
* doesn't work for the open/mmap/close/access_memory_window case, but
that will require some further kernel changes
Works, but lots of little things to nibble on:
* fix permissions to work better
* limit the amount of open files required
* do constant folding with psshfs code
* support authentication
etcetc.