History log of /src/usr.sbin/puffs/mount_psshfs/psshfs.c |
Revision | | Date | Author | Comments |
1.67 |
| 05-Dec-2021 |
msaitoh | s/systme/system/ in comment.
|
1.66 |
| 04-Nov-2012 |
christos | include the headers you use
|
1.65 |
| 31-Aug-2011 |
joerg | branches: 1.65.2; 1.65.8; Use __dead
|
1.64 |
| 25-Aug-2011 |
jakllsch | Bring mount_psshfs user/host/path argument processing in line with sftp(1).
|
1.63 |
| 19-May-2011 |
riastradh | Initialize psshfs root node's readdir waiters queue.
Every other node's readder waiters queue is initialized in makenode, but the root node is created specially.
ok pooka
|
1.62 |
| 29-Oct-2010 |
pooka | Make error message more userfriendly in cases where server does not support sftp.
|
1.61 |
| 17-Feb-2010 |
pooka | umgah. meant fts, not fsu
|
1.60 |
| 17-Feb-2010 |
pooka | Bump the initial rootdir link count guess to a ludicrous value.
|
1.59 |
| 12-Jan-2010 |
pooka | Make r/w servers unmount themselves cleanly upon receiving SIGINT/TERM.
|
1.58 |
| 07-Jan-2010 |
pooka | errx() already contains progname ...
|
1.57 |
| 07-Jan-2010 |
pooka | Don't allow mangling of uid or gid -1, since they have a special meaning in the sftp protocol.
|
1.56 |
| 07-Jan-2010 |
pooka | Add -u and -g, which allow to remap one (local,remote) uidgid, i.e. umapfs without the fuss.
|
1.55 |
| 05-Nov-2009 |
pooka | const woes
|
1.54 |
| 20-May-2009 |
pooka | wait() for dead ssh processes (but don't block, so we might have one teeny zmobie in the system).
|
1.53 |
| 20-May-2009 |
pooka | Fix SNAFU in previous: connection handshake is already handled by the connect routine now, so we're not required/allowed to do it twice. Makes reconnect on dead link work again.
|
1.52 |
| 20-May-2009 |
pooka | Copyright year management. no functional change (unless sarah disagrees)
|
1.51 |
| 20-May-2009 |
pooka | Introduce -c [12], which can be used to open 1 or 2 ssh connections to the server. If "2" is specified, a separate connection is used for data and directory operations. Using two connections can significantly increase directory operation performance on a saturated link, at least up to 30x faster.
|
1.50 |
| 23-Feb-2009 |
pooka | Support statvfs@openssh.com extension where available. Makes df(1) return something other than just 0. caveat: statvfs is done for the mountpoint path, so might not give the truth about a directory inside the mountpoint.
|
1.49 |
| 06-Sep-2008 |
pooka | branches: 1.49.6; Due to a recent encounter with a sucky internet connection, add experimental option -p, which tries to reestablish the connection to the sftp server in case it is lost. This currently has a few limitations (found in the man page), but generally works in some use cases.
Better support might eventually emerge, but since that requires a plunge into the depths of puffs_framebuf, I need quite a bit of Fernet Branca to build up my courage before attempting it.
|
1.48 |
| 11-Aug-2008 |
pooka | call puffs_exit()
|
1.47 |
| 14-Dec-2007 |
jmmv | branches: 1.47.6; Add a -F option to allow passing a configuration file to ssh(1), instead of having to use multiple -O options on the command line. OKed by pooka@.
|
1.46 |
| 30-Nov-2007 |
pooka | Introduce the concept of lazyopens. This means that when a file handle open is requested, it is waited for only if the node was not previously succesfully opened. The actual wait for the file handle happens only when the file handle is actually needed (read or write). This in turn has the effect that reading cached files will be quick instead of waiting for the file handle from the sftp server first. The wait previously could be very long if there were serveral hundred k of outstanding requests in a limited-bandwidth link.
The code is in some need of serious handholding, but it works, so I'll leave that as "future work".
|
1.45 |
| 18-Nov-2007 |
pooka | Don't bother tracking opencount and try to close file handles in the close method - simply just wait for inactive and do it there.
|
1.44 |
| 16-Nov-2007 |
pooka | use puffs_daemon() instead of daemon()
|
1.43 |
| 11-Nov-2007 |
pooka | Don't overload "attributes last read" for the symlink cache, use a separate variable.
|
1.42 |
| 08-Nov-2007 |
pooka | Make it possible to force attribute/directory cache re-read by sending SIGHUP to mount_psshfs.
|
1.41 |
| 08-Nov-2007 |
pooka | don't allow negative timeouts apart from -1
|
1.40 |
| 08-Nov-2007 |
pooka | Make attribute & directory content caching timeout a command line option. Use -t -1 to never expire, which is nifty on a high-latency link where you know the server won't be modified from under you.
|
1.39 |
| 06-Nov-2007 |
pooka | 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).
|
1.38 |
| 05-Nov-2007 |
pooka | 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.
|
1.37 |
| 05-Nov-2007 |
pooka | 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.
|
1.36 |
| 20-Oct-2007 |
pooka | Add option -r to specify maximum number of active read requests for each node. Setting this to a small number can be used to improve interactive performance on low-bandwidth links when performing bulk data reads. Of course I could also open separate pipes for bulk and other, but this was quicker and less intrusive and doesn't require authenticating twice.
|
1.35 |
| 01-Sep-2007 |
pooka | Adapt to new puffs_framev_init() signature - gotfb.
|
1.34 |
| 27-Jul-2007 |
pooka | branches: 1.34.4; 1.34.6; Track memory mappings. Close file handles already in close() if there are no active mappings, otherwise do the standard inactive() run.
|
1.33 |
| 17-Jul-2007 |
pooka | * add mntfromname parameter to puffs_init() * set it in file servers
|
1.32 |
| 07-Jul-2007 |
pooka | I'm fairly certain this file system's type is psshfs, not ppshfs (how did that manage to be there this long?)
|
1.31 |
| 07-Jul-2007 |
pooka | adapt to puffs_framebuf changes
|
1.30 |
| 26-Jun-2007 |
pooka | g/c bit about MNT_NOATIME being mandatory. it obvious isn't since the code was #if 0'd out.
|
1.29 |
| 06-Jun-2007 |
pooka | 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...
|
1.28 |
| 21-May-2007 |
pooka | devnullify ssh process's stderr to avoid tty spam
|
1.27 |
| 17-May-2007 |
pooka | reflect changes in fs mount: use puffs_mount() instead of puffs_domount() & puffs_start()
|
1.26 |
| 15-May-2007 |
pooka | adapt to "step 3" of puffs_framebuf changes
|
1.25 |
| 11-May-2007 |
pooka | use puffs_mainloop(); puffs_framebuf_eventloop() is a goner
|
1.24 |
| 11-May-2007 |
pooka | adapt to puffs_framebuf changes
|
1.23 |
| 09-May-2007 |
pooka | use fprintf instead of errx for usage()
|
1.22 |
| 09-May-2007 |
tnn | 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.
|
1.21 |
| 09-May-2007 |
tnn | 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@
|
1.20 |
| 07-May-2007 |
pooka | Use inactive-on-demand, set inactive request in open() to close file handles when last reference is removed from the kernel.
|
1.19 |
| 06-May-2007 |
pooka | Open files in open and close them in inactive. This avoids the silly and problematic chmod + open + "un"chmod in write, among other things.
|
1.18 |
| 06-May-2007 |
pooka | adapt to puffs_framebuf_eventloop signature change
|
1.17 |
| 05-May-2007 |
pooka | 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.
|
1.16 |
| 02-May-2007 |
pooka | For consistency destroy kernel request putbuffers also when escaping event loop (the process is going to exit anyway, but ...)
|
1.15 |
| 29-Apr-2007 |
pooka | 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.
|
1.14 |
| 22-Apr-2007 |
pooka | 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.
|
1.13 |
| 16-Apr-2007 |
pooka | adapt to kernel changes with file handles
|
1.12 |
| 13-Apr-2007 |
pooka | 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--
|
1.11 |
| 12-Apr-2007 |
pooka | 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.
|
1.10 |
| 12-Apr-2007 |
pooka | 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().
|
1.9 |
| 13-Mar-2007 |
pooka | * 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.
|
1.8 |
| 15-Feb-2007 |
pooka | 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.
|
1.7 |
| 09-Feb-2007 |
pooka | 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).
|
1.6 |
| 20-Jan-2007 |
pooka | more ketchup
|
1.5 |
| 20-Jan-2007 |
pooka | play catchup with the lib
|
1.4 |
| 11-Jan-2007 |
pooka | don't detach if -s or -o dump is given on the command line
|
1.3 |
| 07-Jan-2007 |
pooka | use UBC by default
|
1.2 |
| 06-Jan-2007 |
pooka | * do mount as a forward operation instead of a callback * process -o args for mount
|
1.1 |
| 29-Dec-2006 |
pooka | puffs sshfs, an sshfs implementation built on top of the puffs continuation framework
|
1.34.6.2 |
| 27-Jul-2007 |
pooka | Track memory mappings. Close file handles already in close() if there are no active mappings, otherwise do the standard inactive() run.
|
1.34.6.1 |
| 27-Jul-2007 |
pooka | file psshfs.c was added on branch matt-mips64 on 2007-07-27 09:46:28 +0000
|
1.34.4.2 |
| 09-Jan-2008 |
matt | sync with HEAD
|
1.34.4.1 |
| 06-Nov-2007 |
matt | sync with HEAD
|
1.47.6.1 |
| 18-Sep-2008 |
wrstuden | Sync with wrstuden-revivesa-base-2.
|
1.49.6.1 |
| 13-May-2009 |
jym | Sync with HEAD.
Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
|
1.65.8.1 |
| 20-Nov-2012 |
tls | Resync to 2012-11-19 00:00:00 UTC
|
1.65.2.1 |
| 16-Jan-2013 |
yamt | sync with (a bit old) head
|