Commit Graph

151 Commits

Author SHA1 Message Date
tnn
05ca7e85d0 Add an EXAMPLES section. 2007-05-09 21:00:27 +00:00
tnn
098bf95670 Change [-O sshopt value] to [-O sshopt=value] to better conform with the
way other userland apps behave. In /etc/fstab one would specify options
with -O=sshopt=value.
2007-05-09 20:25:20 +00:00
tnn
edbbe0d8f9 Add flag [-O sshopt value] to mount_psshfs(8), allowing the user to specify
options to pass along to ssh(1). Remove redundant flag [-p sshport]; an
equivalent of -O Port sshport. ok'd by pooka@
2007-05-09 19:54:39 +00:00
pooka
dca252d8a0 Use inactive-on-demand, set inactive request in open() to close
file handles when last reference is removed from the kernel.
2007-05-07 17:20:58 +00:00
pooka
ded3a0bfa7 Open files in open and close them in inactive. This avoids the
silly and problematic chmod + open + "un"chmod in write, among
other things.
2007-05-06 19:48:51 +00:00
pooka
c0da05fe2a Fire off FXP_CLOSE in create() and return immediately instead of
waiting for the result.
2007-05-06 15:30:18 +00:00
pooka
d34b752303 use puffs_framebuf_remaining() 2007-05-06 10:54:55 +00:00
pooka
cfd2c55859 adapt to puffs_framebuf_eventloop signature change 2007-05-06 10:51:19 +00:00
pooka
0e7bdfc146 Adapt to use puffs_framebuf. This gets rid of most of the duplicated
code between mount_psshfs and mount_9p and clarifies the code
structure.
2007-05-05 15:49:51 +00:00
pooka
9c16b5e434 For consistency destroy kernel request putbuffers also when
escaping event loop (the process is going to exit anyway, but ...)
2007-05-02 18:50:30 +00:00
pooka
5e73325b44 g/c forgotten printf 2007-05-01 20:43:14 +00:00
pooka
c442e78507 Add -p to specify server port if someone should for some reason
happen to run sshd on port, to pick a random number, 443.

Probably should give a way to specify rest of the ssh options.
2007-04-29 10:02:56 +00:00
pooka
0809789ff9 Use PUFFS_KFLAG_WTCACHE to avoid the need to do a sync(8) on the
client host to get all the data onto the server.
2007-04-22 20:03:26 +00:00
pooka
4895c619c9 use puffs_cc_getspecific() where puffs_usermount is not required 2007-04-19 20:31:09 +00:00
pooka
8ecf355f37 psbuf_recycle now exists, so use it instead of destroy&make in one
spot I probably missed originally.  No real functional change.
2007-04-18 15:53:20 +00:00
pooka
4c854dd8b4 Use ntohl instead of htonl when converting data from the network.
Result isn't that much different, though ....
2007-04-18 15:35:02 +00:00
pooka
66efb94d3b use PUFFS_STORE_DCOOKIE 2007-04-17 11:43:32 +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
b142df9b67 Actually, we can't reclaim our memory image for nodes which have
been nodetofh translated even if they are not valid on the sftp
server anymore, because some nfs client might still be clinging on
to the file handle we are reclaiming now.
2007-04-12 21:08:49 +00:00
pooka
db8a30d61d document -e for nfs exportability 2007-04-12 21:04:39 +00:00
pooka
bf4e539fe8 Support nfs exporting.
Now, when I say support, I mean "support", due to the limitations
of the backend.  File handles are valid only for one session, since
nodes can only be identified by pathnames and pathnames don't (all)
fit into the nfs file handle space.  Additionally, we can't detect
if a pathname is completely replaced by another file (if it's done
via some other route that through our mount, of course).  But then
again, that's an inherent problem with sshfs even without nfs.
2007-04-12 20:42: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
1cfe630356 adapt to new readdir signature. no functional change 2007-04-11 21:21:50 +00:00
pooka
81cd3e0214 fix another case of checking for return value from wrong variable
(that's what you get when you copypaste code, a cid with a pin
to burst your bubble, that's what you get for all your troubles, I'll
never copypaste again)

CID 4461
2007-04-09 20:59:08 +00:00
pooka
fb8082e163 Check for success from correct variable after allocnode()
CID 4460
2007-04-09 20:52:32 +00:00
pooka
94b72e4fc4 If we have to do a stat in lookup, update time of last stat for
the new node to avoid a most likely immediate stat from the server.
2007-03-22 13:43:58 +00:00
pooka
7517e20c03 In case lookup from the directory listing fails, try statting the
target before giving up.  Makes it possible to access files from
-r+x directories.
2007-03-22 13:11:00 +00:00
pooka
f446ae6b9f * don't require a directory entry to exist for a reclaimee node.
this can happen legally when a file is removed from backing
  storage not using this sshfs instance, a readdir is executed for
  the parent directory and only then the node gets reclaimed.
* now that there is a mechanism in place which does not require a
  pcc to do an sftp transaction, do not yield() in operations where
  the final transaction is something where we don't care about the
  return value (e.g. close handle).  speedup benefit for no cost.
2007-03-13 18:00:34 +00:00
pooka
ad70c5ab2e one more size_t -> uint32_t 2007-02-27 14:17:14 +00:00
pooka
cbb615f4db size_t -> uint32_t cleanup to make LP64 build
noticed by wiz
2007-02-27 13:28:39 +00:00
pooka
b44590b7d0 * document -s
* explicitly mention that this implements sshfs functionality
2007-02-17 22:19:20 +00:00
pooka
f5fed5348b Support reclaim. To support dotdot lookup, here we leave the
reclaimed nodes hanging until all their children have been reclaimed
and then reclaim everything we can as far up to root as possible.
This is because the file system structures are currently interlinked
in a fashion which would make dotdot lookup based on purely a path
instead of a in-memory node parent member pointer very difficult.
Yes, this deserves a closer look some day.
2007-02-15 13:07:29 +00:00
pooka
986368958f Don't destroy puffs_nodes in success paths of remove and rmdir: the
kernel assumes that they will not be recycled until reclaim.
2007-02-10 02:53:27 +00:00
pooka
306e0025cf Implement "superreaddir". This issues a getattr for all the
directory entries already in readdir and caches the results instead
of waiting for each individial getattr from the kernel.  For
high-latency links the difference in "ls -l" is quite astounding
and even on my lan "ls -lR" is faster than for nfs in a normal
directory hierarchy (i.e. not one artifically setup to have thousands
of files per directory).

TODO: implement some sort of bandwidth/latency measurement in the
code and enable or disable this option based on than information
(and a command-line flag).
2007-02-09 23:36:17 +00:00
pooka
984c93b472 more ketchup 2007-01-20 14:37:48 +00:00
pooka
9fcf633272 play catchup with the lib 2007-01-20 13:52:35 +00:00
pooka
5d293715c8 * adapt to libpuffs path changes
* fix bug in rename
2007-01-15 00:42:21 +00:00
pooka
c921b47454 don't detach if -s or -o dump is given on the command line 2007-01-11 18:52:26 +00:00
pooka
0ac919744e Give nukenode a destroy flag. If given, it completely wipes out
the node and directory cache (for directories).  Otherwise it just
nukes directory entry information.  The latter case is used when
renaming.
2007-01-11 18:50:42 +00:00
pooka
9da6af0a36 Invalidate kernel name cache for a directory when (re-)reading
directory contents from the server.
2007-01-09 18:23:21 +00:00
pooka
6ee2e9c031 Mark invalid attributes as invalid. Fixes stuff such a cp'ing files
when cp uses mmap().  Also makes attributes appear correct.
2007-01-09 12:34:20 +00:00
wiz
85181e787c New sentence, new line. Sort SEE ALSO. Punctuation nit. 2007-01-08 07:26:40 +00:00
pooka
94f62e9b01 properly carry fileid for directory entries, fixes pwd 2007-01-07 21:59:27 +00:00
pooka
d66d221ae1 man page for mount_psshfs 2007-01-07 19:56:26 +00:00
pooka
5c80f85b24 use UBC by default 2007-01-07 19:33:23 +00:00
pooka
7f864d6007 * Adapt to openssh standard of timestamps in file attributes. Maybe
should make this work with the IETF standard some day, also.
* kludge with writes and permissions a bit to be able to flush data
  cached in ubc to files which are already with r/o permissions in
  the backend
2007-01-07 19:31:48 +00:00
pooka
c53a62f5e3 fix link count calculation for directories 2007-01-07 19:29:55 +00:00
pooka
a67e4ce37f * do mount as a forward operation instead of a callback
* process -o args for mount
2007-01-06 18:25:19 +00:00
pooka
d584a8d23a SUSv3 says: should the implementation not support directory unlinking,
unlink shall fail with EPERM and the errno of the failure shall be EPERM
2007-01-01 21:32:12 +00:00
pooka
c3ef8ea5d0 puffs sshfs, an sshfs implementation built on top of the puffs
continuation framework
2006-12-29 15:35:39 +00:00