Home | History | Annotate | only in /src/usr.sbin/puffs
History log of /src/usr.sbin/puffs
RevisionDateAuthorComments
 1.22 12-Oct-2024  bad fix spelling of rump_nqmfs and remove accidental "presents"
 1.21 06-Jun-2022  nia branches: 1.21.4;
build system: Revert all the recent additions of MK[...] knobs that
allow conditionally disabling the building of certain user space
programs in the 'base' set.

There is not enough consensus that this is the right way and a few
people had strong objections, see source-changes-d@.
 1.20 27-May-2022  nia mk: Add a MKLFS flag for excluding the log-structured filesystem userspace
tools from the build.
 1.19 04-Apr-2020  christos We don't have smbfs anymore.
 1.18 21-May-2017  riastradh branches: 1.18.10;
Remove MKCRYPTO option.

Originally, MKCRYPTO was introduced because the United States
classified cryptography as a munition and restricted its export. The
export controls were substantially relaxed fifteen years ago, and are
essentially irrelevant for software with published source code.

In the intervening time, nobody bothered to remove the option after
its motivation -- the US export restriction -- was eliminated. I'm
not aware of any other operating system that has a similar option; I
expect it is mainly out of apathy for churn that we still have it.
Today, cryptography is an essential part of modern computing -- you
can't use the internet responsibly without cryptography.

The position of the TNF board of directors is that TNF makes no
representation that MKCRYPTO=no satisfies any country's cryptography
regulations.

My personal position is that the availability of cryptography is a
basic human right; that any local laws restricting it to a privileged
few are fundamentally immoral; and that it is wrong for developers to
spend effort crippling cryptography to work around such laws.

As proposed on tech-crypto, tech-security, and tech-userlevel to no
objections:

https://mail-index.netbsd.org/tech-crypto/2017/05/06/msg000719.html
https://mail-index.netbsd.org/tech-security/2017/05/06/msg000928.html
https://mail-index.netbsd.org/tech-userlevel/2017/05/06/msg010547.html

P.S. Reviewing all the uses of MKCRYPTO in src revealed a lot of
*bad* crypto that was conditional on it, e.g. DES in telnet... That
should probably be removed too, but on the grounds that it is bad,
not on the grounds that it is (nominally) crypto.
 1.17 08-Nov-2015  christos Some of the puffs mount programs don't need RUMP, re-enable them.
 1.16 24-Jul-2011  uch v7fs rump support
 1.15 11-Jul-2010  mrg ldap is configured to depend upon MKCRYPTO no, so force MKLAP=no if
MKCRYPTO=no.
don't build pkg_install, libcrypto tests or rump_smbfs if MKCRYPTO=no.
mark librumpcrypto, rump_smb, pkg_*

fix set lists as appropriate.
 1.14 29-Apr-2010  pooka Add rump_au-naturel, which instead of mounting a file system inside
the rump kernel just attaches to / in said rump kernel instance.
This is mostly useful in case wanting to see what nodes components
create (see Makefile).

not built without manual intervention
 1.13 31-Mar-2010  pooka Add kernfs server.

Don't build & install it by default, since it represents the state
of the rump virtual kernel and not the host kernel. However, it's
useful for debugging kernfs.
 1.12 08-Mar-2010  pooka add commented out nqmfs
 1.11 05-Dec-2009  pooka Remove the portalfs kernel file system driver. Replace mount_portal(8)
with a version based on puffs. User functionality remains the same.
 1.10 06-Sep-2009  pooka Build & install rump_smbfs
 1.9 31-Jul-2009  pooka add commented-out rump_fdesc along with an explanation
 1.8 16-Oct-2008  pooka Add & enable rump_nfs.
 1.7 04-Sep-2008  pooka forgot to commit this - descend into rump_sysvbfs
 1.6 29-Jul-2008  pooka Install rump libraries and utilities to the base system and remove the
private non-installed build infrastructure from sys/rump.

breakdown of commit:
* install relevant headers into /usr/include/rump
* build sys/rump/librump/rumpuser and sys/rump/librump/rumpkern
from src/lib and install as librumpuser and librump, respectively
+ this retains the ability to test a librump build with just the
kernel sources at hand
* move sys/rump/fs/lib/libukfs and sys/rump/fs/lib/libp2k to src/lib
for general consumption, they are not kernel-space dwellers anyway
* build and install sys/rump/fs/lib/lib$fs as librumpfs_$fs
* add chapter 3 manual pages for rump, rumpuser, ukfs and p2k
* build and install userspace kernel file system daemons if MKPUFFS=yes
is spexified
* retire fsconsole for now, it will make a comeback with an actually
implemented version shortly
 1.5 09-Aug-2007  pooka branches: 1.5.10;
add sysctlfs
 1.4 08-Jul-2007  pooka build & install puffsportal (if MKPUFFS)
 1.3 02-Jul-2007  pooka Add initial puffs version of mount_portal, eventually to replace
portalfs. Uses the same config files etc. as the "regular"
mount_portal, and actually compiles a lot of the code directly from
under src/sbin/mount_portal.

Doesn't yet support concurrent access, but I have a pretty clear
vision on how to neatly fix that.
 1.2 21-Apr-2007  pooka descend into mount_9p
 1.1 29-Dec-2006  pooka if MKPUFFS=yes is given, build & install mount_psshfs (default: no)
 1.5.10.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.18.10.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.21.4.2 02-Aug-2025  perseant Sync with HEAD
 1.21.4.1 29-Jun-2024  perseant Implementation of exFAT filesystem, with compilation conditional on MKEXFATFS
make variable.
 1.18 07-Jul-2021  martin Allow to set sanitizer flags for the rump build from the
build.sh command line, like: -V RUMP_SANITIZE=address
 1.17 17-May-2020  christos reverse the order for sun2
 1.16 16-May-2020  christos Oops forgot to commit this.
 1.15 23-Jan-2016  christos Define _KERNTYPES for things that need it.
 1.14 16-Jan-2014  christos eliminate use of bsd.sys.mk from Makefiles
 1.13 25-Jan-2010  pooka branches: 1.13.6; 1.13.12;
Define concept "disk based file system" and flag appropriate file
systems as such.
 1.12 05-Nov-2009  pooka pump up the WARNS to 4
 1.11 21-Jul-2009  pooka Make rump_lfs work again: load fs components dynamically instead
of trying to link them in on the command line and get pounded by
link set failage.
 1.10 18-Jan-2009  he Change the use of formally undocumented features, which have now been
made to fail. Specifically, change
.ifdef(SYMBOL) -> .ifdef SYMBOL or .if defined(SYMBOL),
and corresponding for .ifndef.

Also correct one error in lib/libm/Makefile (.ifdef (${MKCOMPLEX} != "no")?!?).
 1.9 08-Jan-2009  pooka Disable static linking against kernel modules and always use shared
libraries. Kernel module support will require some more happy days
with the kernel linker.
 1.8 05-Jan-2009  pooka malloc(9) -> kern_malloc(9): we don't need --wrap anymore.
 1.7 30-Dec-2008  pooka Link self-contained file systems (i.e. do not depend on other file
systems) against the kernel module on select archs.
 1.6 19-Nov-2008  pooka Split vfs out of rumpkern into rumpvfs. Non-fs rumps no longer
include the file system code. File system rumps explicitly need
to include rumpvfs from now on.
 1.5 06-Aug-2008  pooka Add manual pages for rump file system servers.
 1.4 05-Aug-2008  pooka Refactor mount utilities to provide a mount_fs_parseargs() routine.
Use this routine both in mount_fs and rump_fs to provide equivalent
command line parameters and therefore usage interchangeability.
While doing this, combine some common mountgoop to mountprog.h
 1.3 29-Jul-2008  pooka Install rump libraries and utilities to the base system and remove the
private non-installed build infrastructure from sys/rump.

breakdown of commit:
* install relevant headers into /usr/include/rump
* build sys/rump/librump/rumpuser and sys/rump/librump/rumpkern
from src/lib and install as librumpuser and librump, respectively
+ this retains the ability to test a librump build with just the
kernel sources at hand
* move sys/rump/fs/lib/libukfs and sys/rump/fs/lib/libp2k to src/lib
for general consumption, they are not kernel-space dwellers anyway
* build and install sys/rump/fs/lib/lib$fs as librumpfs_$fs
* add chapter 3 manual pages for rump, rumpuser, ukfs and p2k
* build and install userspace kernel file system daemons if MKPUFFS=yes
is spexified
* retire fsconsole for now, it will make a comeback with an actually
implemented version shortly
 1.2 28-May-2007  tls branches: 1.2.12;
Add new Makefile knob, USE_FORT, which extends USE_SSP by turning on the
FORTIFY_SOURCE feature of libssp, thus checking the size of arguments to
various string and memory copy and set functions (as well as a few system
calls and other miscellany) where known at function entry. RedHat has
evidently built all "core system packages" with this option for some time.

This option should be used at the top of Makefiles (or Makefile.inc where
this is used for subdirectories) but after any setting of LIB.

This is only useful for userland code, and cannot be used in libc or in
any code which includes the libc internals, because it overrides certain
libc functions with macros. Some effort has been made to make USE_FORT=yes
work correctly for a full-system build by having the bsd.sys.mk logic
disable the feature where it should not be used (libc, libssp iteself,
the kernel) but no attempt has been made to build the entire system with
USE_FORT and doing so will doubtless expose numerous bugs and misfeatures.

Adjust the system build so that all programs and libraries that are setuid,
directly handle network data (including serial comm data), perform
authentication, or appear likely to have (or have a history of having)
data-driven bugs (e.g. file(1)) are built with USE_FORT=yes by default,
with the exception of libc, which cannot use USE_FORT and thus uses
only USE_SSP by default. Tested on i386 with no ill results; USE_FORT=no
per-directory or in a system build will disable if desired.
 1.1 29-Dec-2006  pooka Makefile.inc to get BINDIR right
 1.2.12.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.13.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.13.6.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.14 04-Apr-2020  christos We don't have smbfs anymore.
 1.13 24-Jul-2011  uch branches: 1.13.42;
v7fs rump support
 1.12 22-Nov-2010  pooka include script rcsid in generated file
(no change to rendered output)
 1.11 22-Nov-2010  pooka Generate different manpages for 1) disk 2) net 3) fictional file systems.
 1.10 21-Nov-2010  pooka * document disk.img%DISKLABEL:p%
* tweaks
 1.9 31-Mar-2010  pooka Add note saying that the manual page is autogenerated and all parts
may not apply to this particular server.

TODO: have three different texts, one for device backed file systems
(e.g. ffs), another for network backed (e.g. nfs), and a third for
fictional (e.g. kernfs)
 1.8 15-Feb-2009  pooka * include "pseudo-device putter" in synopsis as requested by hubertf
* note that rump p2k utilities are currently experimental (noted
already on the rump manpages, but better note it here also)
 1.7 10-Feb-2009  pooka Note that the rump file servers do not require use of vnconfig when
mounting images. Suggested by apb
 1.6 11-Jan-2009  wiz branches: 1.6.2;
Mark up arguments with Ar and drop trailing whitespace.
 1.5 11-Jan-2009  pooka Note mount -o rump support.
 1.4 16-Oct-2008  pooka branches: 1.4.2;
Be more verbose about the performance hit.
 1.3 05-Sep-2008  wiz branches: 1.3.2;
Fix weird character problem at the source.
 1.2 06-Aug-2008  pooka add comment stating that the manpage is generated
 1.1 06-Aug-2008  pooka add simple utility for autogenerating rump man pages
 1.3.2.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.3.2.1 05-Sep-2008  wrstuden file makerumpmanpages.sh was added on branch wrstuden-revivesa on 2008-09-18 04:30:10 +0000
 1.4.2.1 23-Feb-2009  snj Pull up following revision(s) (requested by pooka in ticket #465):
usr.sbin/puffs/makerumpmanpages.sh: revision 1.5-1.8
Note mount -o rump support.
 1.6.2.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.13.42.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.6 30-Aug-2020  christos include bsd.init.mk to avoid:
make: Bad conditional expression ` != "no"' in != "no"? -DINET6 :
 1.5 19-Jun-2020  uwe Use ?:: modifier instead of .if to check for ipv6.
This way we don't have to include bsd.init.mk early.
 1.4 13-Jun-2020  uwe Support IPv6.

Use getaddrinfo(3). Add -4 and -6 command line options. Obey USE_INET6.
 1.3 22-Apr-2009  lukem Enable WARNS=4 by default, except for:
cpuctl dumplfs hprop ipf iprop-log kadmin kcm kdc kdigest
kimpersonate kstash ktutil makefs ndbootd ntp pppd quot
racoon racoonctl rtadvd sntp sup tcpdchk tcpdmatch tcpdump
traceroute traceroute6 user veriexecgen wsmoused zic
(Mostly third-party applications)
 1.2 18-Jul-2007  pooka branches: 1.2.16; 1.2.20;
get rid of DBG=
 1.1 21-Apr-2007  pooka mount_9p: mount a file server using the Plan9 file sharing protocol

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.
 1.2.20.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.2.16.2 18-Jul-2007  pooka get rid of DBG=
 1.2.16.1 18-Jul-2007  pooka file Makefile was added on branch matt-mips64 on 2007-07-18 22:39:00 +0000
 1.11 28-May-2020  uwe Do not send dummy Tauth, it's completely unnecessary.

The best way to not use authentication is to not use authentication.
Cf. http://man.cat-v.org/plan_9/5/attach
 1.10 17-May-2019  ozaki-r mount_9p: add initial support for 9P2000.u

The implementation enables to work with a server talking 9P2000.u. However, it
doesn't use the extended fields yet; it just ignores those of received messages
and sets "please ignore" values to those of sending messages such as zero-length
strings and maximum unsigned values.

The feature is enabled by the -u option.
 1.9 22-Jun-2011  mrg branches: 1.9.42;
remove some always true if () checks GCC 4.5.3 picks up.
 1.8 24-Aug-2008  pooka fix tyop in error message, no functional change
 1.7 30-Nov-2007  pooka branches: 1.7.8;
Rototill.

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.
 1.6 27-Nov-2007  pooka Remove "puffs_cid" from the puffs interface following l-removal
from the kernel vfs interfaces. puffs_cc_getcaller(pcc) can be
used now should the same information be desired.
 1.5 17-Jul-2007  pooka branches: 1.5.4;
support standard user@host:path mount argument
 1.4 01-Jul-2007  pooka adapt: pid -> const struct puffs_cid *
 1.3 11-May-2007  pooka Error with rtagid instead of tagid. caught by Dan's compiler flags.
 1.2 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.1 21-Apr-2007  pooka mount_9p: mount a file server using the Plan9 file sharing protocol

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.
 1.5.4.1 09-Jan-2008  matt sync with HEAD
 1.7.8.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.9.42.1 10-Jun-2019  christos Sync with HEAD
 1.17 11-Feb-2022  uwe mount_9p(8): Use full month name in previos (oops).
 1.16 10-Feb-2022  uwe mount_9p(8): document the new -C option.
 1.15 14-Jun-2020  uwe Support optional square brackets around the host name.

The brackets are required when using numeric IPv6 addresses as they
contain colons as part of their syntax. We do not enforce that the
thing in the brackets is a numeric IPv6 address - this matches scp
syntax and behavior.
 1.14 13-Jun-2020  uwe Support IPv6.

Use getaddrinfo(3). Add -4 and -6 command line options. Obey USE_INET6.
 1.13 30-May-2020  uwe Provide list of options for ease of reference.
 1.12 28-Oct-2019  wiz Sort SEE ALSO. "file system" police.
 1.11 28-Oct-2019  ozaki-r mount_9p: enable to communicate with vio9p via its character device file

With this feature, we can mount an exported filesystem by a VM host via
virtio-9p.
 1.10 07-Jun-2019  ozaki-r Handle Rerror and return errno correctly (only for 9P2000.u for now)
 1.9 17-May-2019  wiz Merge single-letter options in SYNOPSIS.
Add an article.
 1.8 17-May-2019  ozaki-r mount_9p: add initial support for 9P2000.u

The implementation enables to work with a server talking 9P2000.u. However, it
doesn't use the extended fields yet; it just ignores those of received messages
and sets "please ignore" values to those of sending messages such as zero-length
strings and maximum unsigned values.

The feature is enabled by the -u option.
 1.7 17-May-2019  wiz Add missing .Re.
 1.6 17-May-2019  ozaki-r Refer the current official page
 1.5 17-May-2019  ozaki-r Document the -s option
 1.4 02-Dec-2007  wiz branches: 1.4.70;
Nits. Sort options.
 1.3 17-Jul-2007  pooka branches: 1.3.4;
support standard user@host:path mount argument
 1.2 08-Jul-2007  pooka Accept user as a flag. This way the usage is fstab-compliant:
mount_9p argument mountpoint
 1.1 21-Apr-2007  pooka mount_9p: mount a file server using the Plan9 file sharing protocol

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.
 1.3.4.1 09-Jan-2008  matt sync with HEAD
 1.4.70.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.4.70.1 10-Jun-2019  christos Sync with HEAD
 1.9 28-Oct-2019  ozaki-r mount_9p: enable to communicate with vio9p via its character device file

With this feature, we can mount an exported filesystem by a VM host via
virtio-9p.
 1.8 04-Nov-2012  christos branches: 1.8.30;
add missing header
 1.7 06-Sep-2007  pooka branches: 1.7.28; 1.7.34;
adapt to new cmpfb signature
 1.6 20-May-2007  pooka branches: 1.6.4;
Change the signature of puffs_respcmp to return -1,0,1 for smaller,
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.
 1.5 15-May-2007  pooka don't leak memory if getting data from the buffer fails

CID 4485
 1.4 15-May-2007  pooka adapt to "step 3" of puffs_framebuf changes
 1.3 06-May-2007  pooka use puffs_framebuf_remaining()
 1.2 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.1 21-Apr-2007  pooka mount_9p: mount a file server using the Plan9 file sharing protocol

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.
 1.6.4.1 06-Nov-2007  matt sync with HEAD
 1.7.34.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.7.28.1 16-Jan-2013  yamt sync with (a bit old) head
 1.8.30.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.14 03-Sep-2021  andvar fix typos in comments, mainly s/extention/extension/ and s/sufficent/sufficient/
 1.13 26-May-2020  uwe Do not allocate 9P tags in advance, do it right before we need them.
If we are going to use sequential tags, we might as well try to make
them really sequential.
 1.12 26-May-2020  uwe proto_getstat - g/c debug printfs.
 1.11 07-Jun-2019  ozaki-r Handle Rerror and return errno correctly (only for 9P2000.u for now)
 1.10 17-May-2019  ozaki-r mount_9p: add initial support for 9P2000.u

The implementation enables to work with a server talking 9P2000.u. However, it
doesn't use the extended fields yet; it just ignores those of received messages
and sets "please ignore" values to those of sending messages such as zero-length
strings and maximum unsigned values.

The feature is enabled by the -u option.
 1.9 30-Nov-2007  pooka branches: 1.9.70;
Rototill.

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.
 1.8 07-Jul-2007  pooka branches: 1.8.4;
adapt to puffs_framebuf changes
 1.7 16-May-2007  pooka Enhance the GETRESPONSE, JUSTSEND and SENDCB macros to process the
return value from the network layer.
 1.6 11-May-2007  pooka adapt to puffs_framebuf changes
 1.5 06-May-2007  pooka If mode is set, the uppermost byte specifying the type must be
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.
 1.4 06-May-2007  pooka use puffs_framebuf_remaining()
 1.3 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.2 04-May-2007  pooka free uid and gid strings after use

CID 4474, 4475
 1.1 21-Apr-2007  pooka mount_9p: mount a file server using the Plan9 file sharing protocol

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.
 1.8.4.1 09-Jan-2008  matt sync with HEAD
 1.9.70.1 10-Jun-2019  christos Sync with HEAD
 1.2 17-May-2019  ozaki-r mount_9p: add initial support for 9P2000.u

The implementation enables to work with a server talking 9P2000.u. However, it
doesn't use the extended fields yet; it just ignores those of received messages
and sets "please ignore" values to those of sending messages such as zero-length
strings and maximum unsigned values.

The feature is enabled by the -u option.
 1.1 21-Apr-2007  pooka branches: 1.1.76;
mount_9p: mount a file server using the Plan9 file sharing protocol

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.
 1.1.76.1 10-Jun-2019  christos Sync with HEAD
 1.35 10-Mar-2025  riastradh mount_9p(8): Implement pathconf stub.

Doesn't actually do anything useful -- it just returns EINVAL as
pathconf is supposed to for unknown pathconf key names; by default, it
will return ENOTSUPP, which leads applications like ls(1) to print:

ls: /mnt/.git: Operation not supported

This is a little silly; perhaps puffs should use EINVAL itself instead
of ENOTSUPP. But this change is less risky for now.

PR bin/58768: mount_9p: missing pathconf(2) support
 1.34 10-Feb-2022  ozaki-r branches: 1.34.4;
mount_9p: don't cache path names by default

Caching path names doesn't handle file changes by host, which is
not expected for normal usages. So turn it off by default.

Instead, -C option is added to turn it on.

Patch from k-goda@IIJ with my tweaks
 1.33 14-Jun-2020  uwe Support optional square brackets around the host name.

The brackets are required when using numeric IPv6 addresses as they
contain colons as part of their syntax. We do not enforce that the
thing in the brackets is a numeric IPv6 address - this matches scp
syntax and behavior.
 1.32 13-Jun-2020  uwe Remove -46 from the -c usage. While here, sync usage with man page
(s/devfile/device).
 1.31 13-Jun-2020  wiz Add -46 to usage.
 1.30 13-Jun-2020  uwe Support IPv6.

Use getaddrinfo(3). Add -4 and -6 command line options. Obey USE_INET6.
 1.29 30-May-2020  uwe Initialize puffs9p::server (though it's not used anywhere).
 1.28 29-May-2020  uwe Fix vio9p device name in a comment.
 1.27 28-Oct-2019  ozaki-r mount_9p: enable to communicate with vio9p via its character device file

With this feature, we can mount an exported filesystem by a VM host via
virtio-9p.
 1.26 20-May-2019  ozaki-r mount_9p: add missing -u option to the help message
 1.25 17-May-2019  ozaki-r mount_9p: add initial support for 9P2000.u

The implementation enables to work with a server talking 9P2000.u. However, it
doesn't use the extended fields yet; it just ignores those of received messages
and sets "please ignore" values to those of sending messages such as zero-length
strings and maximum unsigned values.

The feature is enabled by the -u option.
 1.24 31-Aug-2011  joerg branches: 1.24.42;
Use __dead
 1.23 02-Dec-2007  wiz Sort options.
 1.22 16-Nov-2007  pooka use puffs_daemon() instead of daemon()
 1.21 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.20 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.19 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.18 15-Oct-2007  pooka update usage to match reality. caught by jmcneill
 1.17 01-Sep-2007  pooka Adapt to new puffs_framev_init() signature - gotfb.
 1.16 17-Jul-2007  pooka branches: 1.16.4;
* add mntfromname parameter to puffs_init()
* set it in file servers
 1.15 17-Jul-2007  pooka support standard user@host:path mount argument
 1.14 08-Jul-2007  pooka Accept user as a flag. This way the usage is fstab-compliant:
mount_9p argument mountpoint
 1.13 07-Jul-2007  pooka adapt to puffs_framebuf changes
 1.12 19-May-2007  pooka support reclaim. set noref setback when removing a node to prompt
immediate reclaim.
 1.11 17-May-2007  pooka reflect changes in fs mount: use puffs_mount() instead of
puffs_domount() & puffs_start()
 1.10 15-May-2007  pooka adapt to "step 3" of puffs_framebuf changes
 1.9 11-May-2007  pooka use puffs_mainloop(); puffs_framebuf_eventloop() is a goner
 1.8 11-May-2007  pooka adapt to puffs_framebuf changes
 1.7 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.6 06-May-2007  pooka Close file handles in inactive instead of close - a memory mapping
may still be active after a vnode is closed
 1.5 06-May-2007  pooka adapt to puffs_framebuf_eventloop signature change
 1.4 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.3 02-May-2007  pooka For consistency destroy kernel request putbuffers also when
escaping event loop (the process is going to exit anyway, but ...)
 1.2 22-Apr-2007  pooka Alter the strategy for reading/writing a bit. First of all, use
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
 1.1 21-Apr-2007  pooka mount_9p: mount a file server using the Plan9 file sharing protocol

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.
 1.16.4.2 09-Jan-2008  matt sync with HEAD
 1.16.4.1 06-Nov-2007  matt sync with HEAD
 1.24.42.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.24.42.1 10-Jun-2019  christos Sync with HEAD
 1.34.4.1 02-Aug-2025  perseant Sync with HEAD
 1.16 26-May-2020  uwe Use the typedef to declare tag in AUTOVAR. Do not allocate 9P tags in
advance in AUTOVAR, do it right before we need them. Do no reuse tags.
If we are going to use sequential tags, we might as well try to make
them really sequential.
 1.15 28-Oct-2019  ozaki-r mount_9p: enable to communicate with vio9p via its character device file

With this feature, we can mount an exported filesystem by a VM host via
virtio-9p.
 1.14 07-Jun-2019  ozaki-r Handle Rerror and return errno correctly (only for 9P2000.u for now)
 1.13 17-May-2019  ozaki-r mount_9p: add initial support for 9P2000.u

The implementation enables to work with a server talking 9P2000.u. However, it
doesn't use the extended fields yet; it just ignores those of received messages
and sets "please ignore" values to those of sending messages such as zero-length
strings and maximum unsigned values.

The feature is enabled by the -u option.
 1.12 30-Nov-2007  pooka branches: 1.12.70;
Rototill.

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.
 1.11 06-Sep-2007  pooka adapt to new cmpfb signature
 1.10 17-Jul-2007  pooka branches: 1.10.4;
support standard user@host:path mount argument
 1.9 07-Jul-2007  pooka adapt to puffs_framebuf changes
 1.8 16-May-2007  pooka Enhance the GETRESPONSE, JUSTSEND and SENDCB macros to process the
return value from the network layer.
 1.7 15-May-2007  pooka adapt to "step 3" of puffs_framebuf changes
 1.6 11-May-2007  pooka adapt to puffs_framebuf changes
 1.5 06-May-2007  pooka If mode is set, the uppermost byte specifying the type must be
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.
 1.4 06-May-2007  pooka Close file handles in inactive instead of close - a memory mapping
may still be active after a vnode is closed
 1.3 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.2 22-Apr-2007  pooka Alter the strategy for reading/writing a bit. First of all, use
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
 1.1 21-Apr-2007  pooka mount_9p: mount a file server using the Plan9 file sharing protocol

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.
 1.10.4.2 09-Jan-2008  matt sync with HEAD
 1.10.4.1 06-Nov-2007  matt sync with HEAD
 1.12.70.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.12.70.1 10-Jun-2019  christos Sync with HEAD
 1.32 10-Mar-2025  riastradh mount_9p(8): Implement pathconf stub.

Doesn't actually do anything useful -- it just returns EINVAL as
pathconf is supposed to for unknown pathconf key names; by default, it
will return ENOTSUPP, which leads applications like ls(1) to print:

ls: /mnt/.git: Operation not supported

This is a little silly; perhaps puffs should use EINVAL itself instead
of ENOTSUPP. But this change is less risky for now.

PR bin/58768: mount_9p: missing pathconf(2) support
 1.31 02-Mar-2022  ozaki-r branches: 1.31.4;
mount_9p: check returned type for Tread
 1.30 02-Mar-2022  ozaki-r mount_9p: fix writing to a file opened with write-only mode

With the page cache, writing data to a file may demand to read contents
from a storage to fill a page in the page cache first.

Opening a file with write-only mode by a user lets a mount_9p process
open a file with write-only mode too at a 9p server. Thus, a read
request to the file from the page cache fails.

So we need to open a file always with read mode (internally) even if it
is opened with write-only mode by a user.

Note that the change doesn't mean that mount_9p allows users to read
contents from a file that is opened with write-only mode.
 1.29 01-Jun-2020  uwe Fix extra whitespace added by accident.
 1.28 27-May-2020  uwe puffs9p_node_rename - 9P rename is done with Twstat and can only
change the last pathname component. Return EXDEV for attempts to move
a file to a different directory to make mv(1) fall back to copying.
 1.27 27-May-2020  uwe noderemove - do not call puffs_setback here. noderemove is called
from rename (for existing target) and calling setback is not
appropriate in that context. Do that call instead directly in the
callers (remove, rmdir).

From Nicola Girardi, part of PR/54829.
 1.26 27-May-2020  uwe puffs9p_node_rename - noderename takes puffs_node, not p9pnode, but
this goes undetected b/c pn_data we pass is a pointer to void.

From Nicola Girardi, part of PR/54829.
 1.25 26-May-2020  uwe Use the typedef to declare tag in AUTOVAR. Do not allocate 9P tags in
advance in AUTOVAR, do it right before we need them. Do no reuse tags.
If we are going to use sequential tags, we might as well try to make
them really sequential.
 1.24 26-May-2020  uwe puffs9p_node_lookup - use the right type for tfid.
 1.23 07-Jun-2019  ozaki-r branches: 1.23.2;
Handle Rerror and return errno correctly (only for 9P2000.u for now)
 1.22 17-May-2019  ozaki-r mount_9p: add initial support for 9P2000.u

The implementation enables to work with a server talking 9P2000.u. However, it
doesn't use the extended fields yet; it just ignores those of received messages
and sets "please ignore" values to those of sending messages such as zero-length
strings and maximum unsigned values.

The feature is enabled by the -u option.
 1.21 18-Jan-2009  lukem branches: 1.21.40; 1.21.48;
fix -Wsign-compare issues
 1.20 22-Aug-2008  pooka * Apparently u9fs returns the inode number as the unique qidpath.
This is fairly annoying if browsing a hierarchy with multiple file
systems mounted, since at least inode 2 is fairly common. Compensate
by comparing modification time also. Not perfect, but ....
* Don't loop eternally if we attempt to read at or past EOF. Fixes
reading files on a non-cached mount.
 1.19 30-Nov-2007  pooka branches: 1.19.8;
Rototill.

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.
 1.18 27-Nov-2007  pooka Remove "puffs_cid" from the puffs interface following l-removal
from the kernel vfs interfaces. puffs_cc_getcaller(pcc) can be
used now should the same information be desired.
 1.17 13-Oct-2007  pooka Execute getattr in lookup to get file size. The kernel doesn't
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.
 1.16 02-Jul-2007  pooka branches: 1.16.4;
adapt: inactive no longer comes with int *refcount (not that it was
used except for setting the default here anyway)
 1.15 01-Jul-2007  pooka adapt: **newnode etc. pointers -> struct puffs_newinfo
 1.14 01-Jul-2007  pooka adapt: pid -> const struct puffs_cid *
 1.13 24-Jun-2007  pooka Call puffs_pn_remove() just in case the file server happens to be
quick with recycling qids.
 1.12 19-May-2007  pooka support reclaim. set noref setback when removing a node to prompt
immediate reclaim.
 1.11 16-May-2007  pooka Enhance the GETRESPONSE, JUSTSEND and SENDCB macros to process the
return value from the network layer.
 1.10 15-May-2007  pooka In case we counter a protocol error while parsing the readdir response,
completely release our directory cookie - it's unlike we'll be coming
back to it. And if we do, it'll just be autogenerated.

CID 4487
 1.9 15-May-2007  pooka free name from proto_getstat() after use

CID 4488
 1.8 11-May-2007  pooka adapt to puffs_framebuf changes
 1.7 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.6 06-May-2007  pooka If mode is set, the uppermost byte specifying the type must be
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.
 1.5 06-May-2007  pooka Close file handles in inactive instead of close - a memory mapping
may still be active after a vnode is closed
 1.4 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.3 04-May-2007  pooka Fix a couple of gotchas left after AUTOVAR() started creating the
network buffers.

CID 4477, 4478, 4479, 4480
 1.2 22-Apr-2007  pooka Alter the strategy for reading/writing a bit. First of all, use
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
 1.1 21-Apr-2007  pooka mount_9p: mount a file server using the Plan9 file sharing protocol

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.
 1.16.4.2 09-Jan-2008  matt sync with HEAD
 1.16.4.1 06-Nov-2007  matt sync with HEAD
 1.19.8.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.21.48.1 10-Jun-2019  christos Sync with HEAD
 1.21.40.2 18-Mar-2022  martin Minimal build fix for ticket #1738
 1.21.40.1 15-Mar-2022  martin Pull up following revision(s) (requested by ozaki-r in ticket #1738):

usr.sbin/puffs/mount_9p/node.c: revision 1.30
usr.sbin/puffs/mount_9p/node.c: revision 1.31

mount_9p: fix writing to a file opened with write-only mode

With the page cache, writing data to a file may demand to read contents
from a storage to fill a page in the page cache first.

Opening a file with write-only mode by a user lets a mount_9p process
open a file with write-only mode too at a 9p server. Thus, a read
request to the file from the page cache fails.

So we need to open a file always with read mode (internally) even if it
is opened with write-only mode by a user.

Note that the change doesn't mean that mount_9p allows users to read
contents from a file that is opened with write-only mode.

-

mount_9p: check returned type for Tread
 1.23.2.1 15-Mar-2022  martin Pull up following revision(s) (requested by ozaki-r in ticket #1434):

usr.sbin/puffs/mount_9p/node.c: revision 1.30
usr.sbin/puffs/mount_9p/node.c: revision 1.31

mount_9p: fix writing to a file opened with write-only mode

With the page cache, writing data to a file may demand to read contents
from a storage to fill a page in the page cache first.

Opening a file with write-only mode by a user lets a mount_9p process
open a file with write-only mode too at a 9p server. Thus, a read
request to the file from the page cache fails.

So we need to open a file always with read mode (internally) even if it
is opened with write-only mode by a user.

Note that the change doesn't mean that mount_9p allows users to read
contents from a file that is opened with write-only mode.

-

mount_9p: check returned type for Tread
 1.31.4.1 02-Aug-2025  perseant Sync with HEAD
 1.8 26-May-2020  uwe getdfwithoffset - do not issue dummy read to seek to offset zero on a
newly opened fid as it's already there. This is redundant and also
seems to confuse inferno when issued against the root directory. Now
you can ls the mount point of

styxlisten -A 'tcp!*!styx' export /

While here fix the seek logic to actually repeatedly seek forward
instead of always doing it from zero.
 1.7 07-Jun-2019  ozaki-r Handle Rerror and return errno correctly (only for 9P2000.u for now)
 1.6 30-Nov-2007  pooka branches: 1.6.70;
Rototill.

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.
 1.5 16-May-2007  pooka branches: 1.5.4;
Enhance the GETRESPONSE, JUSTSEND and SENDCB macros to process the
return value from the network layer.
 1.4 15-May-2007  pooka * free framebuf after use (even in the common path ;)
* simplify a loop
 1.3 11-May-2007  pooka adapt to puffs_framebuf changes
 1.2 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.1 21-Apr-2007  pooka mount_9p: mount a file server using the Plan9 file sharing protocol

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.
 1.5.4.1 09-Jan-2008  matt sync with HEAD
 1.6.70.1 10-Jun-2019  christos Sync with HEAD
 1.4 22-Apr-2009  lukem Enable WARNS=4 by default, except for:
cpuctl dumplfs hprop ipf iprop-log kadmin kcm kdc kdigest
kimpersonate kstash ktutil makefs ndbootd ntp pppd quot
racoon racoonctl rtadvd sntp sup tcpdchk tcpdmatch tcpdump
traceroute traceroute6 user veriexecgen wsmoused zic
(Mostly third-party applications)
 1.3 18-Jul-2007  pooka branches: 1.3.16; 1.3.20;
get rid of DBG=
 1.2 07-Jan-2007  pooka man page for mount_psshfs
 1.1 29-Dec-2006  pooka puffs sshfs, an sshfs implementation built on top of the puffs
continuation framework
 1.3.20.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.3.16.2 18-Jul-2007  pooka get rid of DBG=
 1.3.16.1 18-Jul-2007  pooka file Makefile was added on branch matt-mips64 on 2007-07-18 22:39:00 +0000
 1.25 23-Sep-2019  christos Restore binary compatibility by using the statvfs90 structure internally.
 1.24 22-Jun-2011  mrg branches: 1.24.42;
remove some always true if () checks GCC 4.5.3 picks up.
 1.23 29-Oct-2010  pooka Make error message more userfriendly in cases where server does
not support sftp.
 1.22 01-Apr-2010  pooka In case we create a file, reclaim the vnode, and lookup the file
without the directory timeout expiring, we get vattr_null as the
attributes for that file. Ensure that we always report sane
attributes by getting them from the server if this is the case.
(also, sprinkle some const)

Fixes problem reported by dyoung. But wait! The bug's medallion
begins to glow! The bug looks much better! I crumble to dust.

There's probably another similar bug related to "lazy open". It
will trigger if we reclaim a node before the response to the open
arrives. Even the comments (typoless) know about this bug ...
But verifying it exists and fixing it will have to wait for another
day.
 1.21 03-Feb-2010  pooka statvfs:

Since bresvd is not available from the server, calculate:
bresvd = bfree - bavail.

Then df calculates:
bavail = bfree - bresvd;

And we now get a much more accurate report from df on how much one
can write to the fs.
 1.20 20-May-2009  pooka Copyright year management. no functional change (unless sarah disagrees)
 1.19 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.18 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.17 06-Sep-2008  pooka branches: 1.17.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.16 12-Aug-2008  pooka void * -> puffs_cookie_t
no functional change
 1.15 30-Nov-2007  pooka branches: 1.15.8;
Rototill.

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.
 1.14 27-Nov-2007  pooka Remove "puffs_cid" from the puffs interface following l-removal
from the kernel vfs interfaces. puffs_cc_getcaller(pcc) can be
used now should the same information be desired.
 1.13 01-Jul-2007  pooka branches: 1.13.4;
adapt: **newnode etc. pointers -> struct puffs_newinfo
 1.12 01-Jul-2007  pooka adapt: pid -> const struct puffs_cid *
 1.11 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.10 18-May-2007  pooka * use NOREF setback to prompt immediate (well, once the kernel
reference count goes to 0) reclaim of deleted nodes as opposed to
waiting for the system to start reclaiming the freelist
* combine some nodeflags from different variable to one status variable
 1.9 17-May-2007  pooka reflect changes in fs mount: use puffs_mount() instead of
puffs_domount() & puffs_start()
 1.8 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.7 18-Apr-2007  pooka psbuf_recycle now exists, so use it instead of destroy&make in one
spot I probably missed originally. No real functional change.
 1.6 12-Apr-2007  pooka 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.
 1.5 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.4 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.3 15-Jan-2007  pooka * adapt to libpuffs path changes
* fix bug in rename
 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.13.4.1 09-Jan-2008  matt sync with HEAD
 1.15.8.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.17.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.24.42.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.27 25-Jun-2014  szptvlfn s/stavfs/statvfs/
 1.26 25-Dec-2012  reed branches: 1.26.6;
fix spelling typo
 1.25 15-Sep-2011  wiz branches: 1.25.2; 1.25.8;
Wording, from Snader_LB.
 1.24 03-Feb-2010  pooka Give credit: psshfs was inspired by FUSE sshfs.
 1.23 07-Jan-2010  wiz Don't be terse.
 1.22 07-Jan-2010  pooka Add -u and -g, which allow to remap one (local,remote) uidgid, i.e.
umapfs without the fuss.
 1.21 20-May-2009  pooka Copyright year management. no functional change (unless sarah disagrees)
 1.20 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.19 26-Feb-2009  wiz Make "sftp" a link.
 1.18 25-Feb-2009  pooka add caveat about info displayed by df(1)
 1.17 06-Sep-2008  pooka branches: 1.17.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.16 14-Dec-2007  jmmv branches: 1.16.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.15 03-Dec-2007  wiz Do not overload Xr macro.
 1.14 02-Dec-2007  wiz Sort SEE ALSO. Minor nit fixes.
 1.13 08-Nov-2007  pooka Make it possible to force attribute/directory cache re-read by
sending SIGHUP to mount_psshfs.
 1.12 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.11 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.10 24-Jun-2007  pooka branches: 1.10.4;
PUFFS_KFLAG_NOCACHE became two, so introduce the command line options
-o nonamecache and -o nopagecache and adapt file systems where necessary.
 1.9 09-May-2007  pooka remove caveat no longer applicable
 1.8 09-May-2007  tnn Add an EXAMPLES section.
 1.7 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.6 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.5 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.4 12-Apr-2007  pooka document -e for nfs exportability
 1.3 17-Feb-2007  pooka * document -s
* explicitly mention that this implements sshfs functionality
 1.2 08-Jan-2007  wiz New sentence, new line. Sort SEE ALSO. Punctuation nit.
 1.1 07-Jan-2007  pooka man page for mount_psshfs
 1.10.4.2 09-Jan-2008  matt sync with HEAD
 1.10.4.1 06-Nov-2007  matt sync with HEAD
 1.16.6.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.17.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.25.8.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.25.8.1 25-Feb-2013  tls resync with head
 1.25.2.1 23-Jan-2013  yamt sync with head
 1.26.6.1 10-Aug-2014  tls Rebase.
 1.66 16-Sep-2021  andvar fix typos in word "successfully", mainly s/succesfully/successfully/.
 1.65 07-Oct-2016  christos PR/514612: Mateusz Paszwa: When no more data, bail out (reading from empty
files) instead of stuck looping.
 1.64 20-Jan-2012  jakllsch branches: 1.64.22;
Ensure psshfs_node_read() completely reads all data before return.
Fixes file corruption in psshfs exposed with kernel MAXPHYS at 128KiB.
 1.63 12-Aug-2011  riastradh branches: 1.63.2;
Cache vattr in psshfs's setattr.

This means within the cache window, a setattr that wouldn't change the
remote file's attributes from our current view of them will not be
relayed to the server and wait for the server to answer. Thus, e.g., a
process with a periodic timer interrupt that calls open(2) in a loop
can make progress with much higher probability than without caching.

XXX The test case doesn't work, so it's currently disabled. It needs
to stop the child of sshd that is handling an sftp session, not sshd
itself, and it's not obvious how to do that.

ok pooka
 1.62 29-Oct-2010  pooka Make error message more userfriendly in cases where server does
not support sftp.
 1.61 01-Apr-2010  pooka In case we create a file, reclaim the vnode, and lookup the file
without the directory timeout expiring, we get vattr_null as the
attributes for that file. Ensure that we always report sane
attributes by getting them from the server if this is the case.
(also, sprinkle some const)

Fixes problem reported by dyoung. But wait! The bug's medallion
begins to glow! The bug looks much better! I crumble to dust.

There's probably another similar bug related to "lazy open". It
will trigger if we reclaim a node before the response to the open
arrives. Even the comments (typoless) know about this bug ...
But verifying it exists and fixing it will have to wait for another
day.
 1.60 07-Jan-2010  pooka Add -u and -g, which allow to remap one (local,remote) uidgid, i.e.
umapfs without the fuss.
 1.59 05-Nov-2009  pooka more lp64 it's-a-sign! fixes
 1.58 20-May-2009  pooka Copyright year management. no functional change (unless sarah disagrees)
 1.57 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.56 29-Mar-2009  pooka Save errno before descending to cleanup gehennom.
 1.55 01-Jan-2009  pooka branches: 1.55.2;
Track parent directory in cross-directory renames so that mv & rm
for the same file during a vnode's lifecycle works.

... rename fix .. it's going to be a good year ...
 1.54 12-Aug-2008  pooka branches: 1.54.4;
void * -> puffs_cookie_t
no functional change
 1.53 09-Dec-2007  pooka branches: 1.53.8;
When creating a node, do the server-dance before creating the local
data structure. This avoids a race between create and lookup, as
the kernel now unlock the directory before the create operation
returns.
 1.52 07-Dec-2007  pooka Don't use puffs_cc_getusermount()
 1.51 07-Dec-2007  pooka Get rid of a lot of extra complexity due to doing separate getattr
requests in readdir - just use the results from the readdir rpc.
 1.50 07-Dec-2007  pooka In case a node is created in lookup in the readdir path, initialize
attribute cache timestamp to be equal to that of the directory
cache timestamp.
 1.49 04-Dec-2007  pooka When scheduling waiters for re-run, remove them from the waitqueue
already when scheduling to make sure they're not scheduled more
than once.
 1.48 30-Nov-2007  pooka Rototill.

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.
 1.47 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.46 27-Nov-2007  pooka Remove "puffs_cid" from the puffs interface following l-removal
from the kernel vfs interfaces. puffs_cc_getcaller(pcc) can be
used now should the same information be desired.
 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 11-Nov-2007  pooka Don't overload "attributes last read" for the symlink cache,
use a separate variable.
 1.43 10-Nov-2007  pooka Cache readlink results similarly to attributes. Makes "cd" fast
for a slow connection if a symlink is along the path.

(this should be done elsewhere, but I want it for sshfs now)
 1.42 21-Oct-2007  pooka Use puffs_cc_schedule() (which is an exported interface) instead of
plugging directly to puffs_goto().
 1.41 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.40 16-Oct-2007  pooka Close file handles if opencount drops to zero instead of closing
them if it does not drop to zero, i.e. fix a pretty obvious bug.
 1.39 24-Aug-2007  pooka branches: 1.39.2;
If a node is forcibly reclaimed, close can be called more times
than open (or less, for the particular fs). So don't be uptight
about opencount.
 1.38 23-Aug-2007  pooka Prevent crash in case there is more than one reader for the same
directory concurrently. Might need to revisit the method used here
later, though.
 1.37 29-Jul-2007  pooka branches: 1.37.4;
make closehandles() void, because that's what it is
 1.36 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.35 19-Jul-2007  pooka Oops, the cookies for nfs of course represent the *next* directory
entry offset, not the current one.
 1.34 16-Jul-2007  pooka If the target node exists in rename, do not try to issue a setback
to signal no references, as that is not currently supported for
node_rename(). The removed node will not immediately be reclaimed,
but we can live with that for now.

While here, factor the removal code a bit to share with remove and
rmdir.

fixes PR kern/36637 by reinoud
 1.33 02-Jul-2007  pooka adapt: inactive no longer comes with int *refcount (not that it was
used except for setting the default here anyway)
 1.32 01-Jul-2007  pooka adapt: **newnode etc. pointers -> struct puffs_newinfo
 1.31 01-Jul-2007  pooka adapt: pid -> const struct puffs_cid *
 1.30 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.29 18-May-2007  pooka remove obvious incorrect assert() from doreclaim() and remove the
whole PSN_NUKED bit - it's not very useful because of the noref setback.
 1.28 18-May-2007  pooka * use NOREF setback to prompt immediate (well, once the kernel
reference count goes to 0) reclaim of deleted nodes as opposed to
waiting for the system to start reclaiming the freelist
* combine some nodeflags from different variable to one status variable
 1.27 15-May-2007  pooka adapt to "step 3" of puffs_framebuf changes
 1.26 11-May-2007  pooka adapt to puffs_framebuf changes
 1.25 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.24 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.23 06-May-2007  pooka Fire off FXP_CLOSE in create() and return immediately instead of
waiting for the result.
 1.22 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.21 01-May-2007  pooka g/c forgotten printf
 1.20 19-Apr-2007  pooka use puffs_cc_getspecific() where puffs_usermount is not required
 1.19 17-Apr-2007  pooka use PUFFS_STORE_DCOOKIE
 1.18 12-Apr-2007  pooka 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.
 1.17 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.16 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.15 11-Apr-2007  pooka adapt to new readdir signature. no functional change
 1.14 09-Apr-2007  pooka 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
 1.13 09-Apr-2007  pooka Check for success from correct variable after allocnode()

CID 4460
 1.12 22-Mar-2007  pooka 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.
 1.11 22-Mar-2007  pooka 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.
 1.10 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.9 27-Feb-2007  pooka size_t -> uint32_t cleanup to make LP64 build

noticed by wiz
 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 10-Feb-2007  pooka Don't destroy puffs_nodes in success paths of remove and rmdir: the
kernel assumes that they will not be recycled until reclaim.
 1.6 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.5 15-Jan-2007  pooka * adapt to libpuffs path changes
* fix bug in rename
 1.4 11-Jan-2007  pooka 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.
 1.3 07-Jan-2007  pooka * 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
 1.2 01-Jan-2007  pooka SUSv3 says: should the implementation not support directory unlinking,
unlink shall fail with EPERM and the errno of the failure shall be EPERM
 1.1 29-Dec-2006  pooka puffs sshfs, an sshfs implementation built on top of the puffs
continuation framework
 1.37.4.2 29-Jul-2007  pooka make closehandles() void, because that's what it is
 1.37.4.1 29-Jul-2007  pooka file node.c was added on branch matt-mips64 on 2007-07-29 17:50:23 +0000
 1.39.2.2 09-Jan-2008  matt sync with HEAD
 1.39.2.1 06-Nov-2007  matt sync with HEAD
 1.53.8.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.54.4.1 16-Jan-2009  snj Pull up following revision(s) (requested by pooka in ticket #254):
usr.sbin/puffs/mount_psshfs/node.c: revision 1.55
Track parent directory in cross-directory renames so that mv & rm
for the same file during a vnode's lifecycle works.
... rename fix .. it's going to be a good year ...
 1.55.2.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.63.2.1 17-Apr-2012  yamt sync with head
 1.64.22.1 04-Nov-2016  pgoyette Sync with HEAD
 1.19 04-Nov-2012  christos include the headers you use
 1.18 08-Jan-2010  pooka branches: 1.18.6; 1.18.12;
Fix compilation with -Wsign-compare. Apparently 5.0 doesn't have
-Wsign-compare enabled, which explains a thing or two ...

pointed out by gson
 1.17 07-Jan-2010  pooka Fix chgrp (and don't rely on VNOVAL being -1, however unlikely that
is to be broken).
 1.16 07-Jan-2010  pooka Add -u and -g, which allow to remap one (local,remote) uidgid, i.e.
umapfs without the fuss.
 1.15 05-Nov-2009  pooka more lp64 it's-a-sign! fixes
 1.14 20-May-2009  pooka Copyright year management. no functional change (unless sarah disagrees)
 1.13 06-Sep-2008  pooka 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.12 06-Sep-2007  pooka branches: 1.12.8;
adapt to new cmpfb signature
 1.11 26-Jun-2007  pooka branches: 1.11.4;
Fix return value comparison inversion. Makes psshfs work for the
nocache case again, as the server error value for EOF is properly
handled again.
 1.10 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.9 20-May-2007  pooka Change the signature of puffs_respcmp to return -1,0,1 for smaller,
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.
 1.8 15-May-2007  pooka adapt to "step 3" of puffs_framebuf changes
 1.7 12-May-2007  pooka uint32_t vs. size_t pointer adjustments for LP64 build
 1.6 06-May-2007  pooka use puffs_framebuf_remaining()
 1.5 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.4 18-Apr-2007  pooka Use ntohl instead of htonl when converting data from the network.
Result isn't that much different, though ....
 1.3 27-Feb-2007  pooka size_t -> uint32_t cleanup to make LP64 build

noticed by wiz
 1.2 07-Jan-2007  pooka * 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
 1.1 29-Dec-2006  pooka puffs sshfs, an sshfs implementation built on top of the puffs
continuation framework
 1.11.4.1 06-Nov-2007  matt sync with HEAD
 1.12.8.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.18.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.18.6.1 16-Jan-2013  yamt sync with (a bit old) head
 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
 1.40 01-Apr-2010  pooka In case we create a file, reclaim the vnode, and lookup the file
without the directory timeout expiring, we get vattr_null as the
attributes for that file. Ensure that we always report sane
attributes by getting them from the server if this is the case.
(also, sprinkle some const)

Fixes problem reported by dyoung. But wait! The bug's medallion
begins to glow! The bug looks much better! I crumble to dust.

There's probably another similar bug related to "lazy open". It
will trigger if we reclaim a node before the response to the open
arrives. Even the comments (typoless) know about this bug ...
But verifying it exists and fixing it will have to wait for another
day.
 1.39 07-Jan-2010  pooka Add -u and -g, which allow to remap one (local,remote) uidgid, i.e.
umapfs without the fuss.
 1.38 05-Nov-2009  pooka more lp64 it's-a-sign! fixes
 1.37 20-May-2009  pooka Copyright year management. no functional change (unless sarah disagrees)
 1.36 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.35 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.34 06-Sep-2008  pooka branches: 1.34.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.33 07-Dec-2007  pooka branches: 1.33.8;
Don't use puffs_cc_getusermount()
 1.32 07-Dec-2007  pooka Get rid of a lot of extra complexity due to doing separate getattr
requests in readdir - just use the results from the readdir rpc.
 1.31 30-Nov-2007  pooka Rototill.

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.
 1.30 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.29 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.28 11-Nov-2007  pooka Don't overload "attributes last read" for the symlink cache,
use a separate variable.
 1.27 10-Nov-2007  pooka Cache readlink results similarly to attributes. Makes "cd" fast
for a slow connection if a symlink is along the path.

(this should be done elsewhere, but I want it for sshfs now)
 1.26 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.25 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.24 06-Sep-2007  pooka adapt to new cmpfb signature
 1.23 23-Aug-2007  pooka branches: 1.23.2;
Prevent crash in case there is more than one reader for the same
directory concurrently. Might need to revisit the method used here
later, though.
 1.22 27-Jul-2007  pooka branches: 1.22.4;
Track memory mappings. Close file handles already in close() if there
are no active mappings, otherwise do the standard inactive() run.
 1.21 07-Jul-2007  pooka adapt to puffs_framebuf changes
 1.20 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.19 20-May-2007  pooka Observe that when doing ls -l, the attributes of the first file
getattr are usually still outstanding when we already would like
the result. Instead of issueing another stat which will be serviced
only after all the other entries in the directory, record all the
outgoing readdir getattr buffers and if we encounter an outstanding
request when we need to fetch attrs, do a puffs_framev_framebuf_ccpromote()
wait for it instead of firing off the second query. This shaves
almost 10% off the time for ls -lR.

Also, get rid of the SUPERREADDIR conditional, since it has penetrated
the code quite a bit and the #ifdef SUPERREADDIRs were starting to
look like tagliatelle alla bolognese (n.b. I love how it looks,
but I wouldn't like it either if my tagliatelle alla bolognese
looked like psshfs code). Maybe it should be re-introduced in the
form of a switch?
 1.18 20-May-2007  pooka Implement SUPERREADDIR (like nfs readdirplus) getattr cache warming
a bit differently: when reading the directory, store all getattr
caching queries and fire off only when the directory read is
complete. That way the common sequence is not [readdir, lots of
async getattr requests, readdir EOF] but rather [readdir, readdir
EOF, lots of async getattr]. This speeds up ls -lR by about 25%
(on my LAN).
 1.17 18-May-2007  pooka remove obvious incorrect assert() from doreclaim() and remove the
whole PSN_NUKED bit - it's not very useful because of the noref setback.
 1.16 18-May-2007  pooka * use NOREF setback to prompt immediate (well, once the kernel
reference count goes to 0) reclaim of deleted nodes as opposed to
waiting for the system to start reclaiming the freelist
* combine some nodeflags from different variable to one status variable
 1.15 15-May-2007  pooka adapt to "step 3" of puffs_framebuf changes
 1.14 12-May-2007  pooka uint32_t vs. size_t pointer adjustments for LP64 build
 1.13 11-May-2007  pooka adapt to puffs_framebuf changes
 1.12 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.11 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.10 19-Apr-2007  pooka use puffs_cc_getspecific() where puffs_usermount is not required
 1.9 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.8 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.7 22-Mar-2007  pooka 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.
 1.6 27-Feb-2007  pooka size_t -> uint32_t cleanup to make LP64 build

noticed by wiz
 1.5 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.4 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.3 15-Jan-2007  pooka * adapt to libpuffs path changes
* fix bug in rename
 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.22.4.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.22.4.1 27-Jul-2007  pooka file psshfs.h was added on branch matt-mips64 on 2007-07-27 09:46:29 +0000
 1.23.2.2 09-Jan-2008  matt sync with HEAD
 1.23.2.1 06-Nov-2007  matt sync with HEAD
 1.33.8.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.34.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.2 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.1 29-Dec-2006  pooka puffs sshfs, an sshfs implementation built on top of the puffs
continuation framework
 1.51 04-Nov-2012  christos include the headers you use
 1.50 01-Apr-2010  pooka branches: 1.50.6; 1.50.12;
In case we create a file, reclaim the vnode, and lookup the file
without the directory timeout expiring, we get vattr_null as the
attributes for that file. Ensure that we always report sane
attributes by getting them from the server if this is the case.
(also, sprinkle some const)

Fixes problem reported by dyoung. But wait! The bug's medallion
begins to glow! The bug looks much better! I crumble to dust.

There's probably another similar bug related to "lazy open". It
will trigger if we reclaim a node before the response to the open
arrives. Even the comments (typoless) know about this bug ...
But verifying it exists and fixing it will have to wait for another
day.
 1.49 17-Feb-2010  pooka Save "." attributes in readdir. This fixes the root link count
after readdir is called for the root dir the first time (yes,
there's still a window of wrong link count after the fs is mounted.
it's currently quite difficult to call sftp_readdir() from outside
the main loop).

Should fix "find /mnt" problem for a mountpoint with more than the
"guessed" amount of subdirectories, as reported by dyoung.
 1.48 07-Jan-2010  pooka Add -u and -g, which allow to remap one (local,remote) uidgid, i.e.
umapfs without the fuss.
 1.47 05-Nov-2009  pooka more lp64 it's-a-sign! fixes
 1.46 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.45 13-Dec-2007  pooka Record inode number in psshfs_dir also for already instantiated
nodes when doing readdir. This makes pwd work again for cases
where getcwd() actually has to do the "READDIR + compare inode
numbers" trick.

Yet another problem reported by jmmv.
 1.44 13-Dec-2007  pooka *blink*, remember to update comment too
 1.43 13-Dec-2007  pooka Do previous in a way which causes less waste of potential inode numbers.
 1.42 12-Dec-2007  pooka Fix lossage noticed by jmmv (mostly for -t 0 mounts) and make sure
a node always has the inode number set. And since I'm feeling
generous, sprinkle a few comments around the affected areas (mostly
so that I'd remember what in the world the code is trying to do).
 1.41 07-Dec-2007  pooka Don't use puffs_cc_getusermount()
 1.40 07-Dec-2007  pooka Get rid of a lot of extra complexity due to doing separate getattr
requests in readdir - just use the results from the readdir rpc.
 1.39 05-Dec-2007  pooka Invalidate namecache for a directory only if we've already read it
at least once.
 1.38 30-Nov-2007  pooka Rototill.

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.
 1.37 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.36 16-Nov-2007  pooka If a regular file was remotely updated and a readdir was done on
the directory which contained the file before a getattr on the file
itself, the locally cached mtime would be updated without invalidating
the kernel page cache. Thus incorrect data would be returned when
the node was read afterwards as the node size wouldn't match the
data length in the page cache.

Fix the problem by making all vattr-setting routines use the same code.

Problem noticed again by jmmv & atf (and again by running atf over
psshfs ... sometimes you're the windshield, sometimes you're the bug)
 1.35 16-Nov-2007  jmmv Drop trailing whitespace. On behalf of pooka.
 1.34 16-Nov-2007  pooka When checking if the file page cache should be invalidated, compare
against cached mtime instead of attrread - attrread can be reset
these days by sending SIGHUP.

Problem noticed by jmmv & atf (well.. namely by using atf through psshfs).
 1.33 10-Nov-2007  pooka Cache readlink results similarly to attributes. Makes "cd" fast
for a slow connection if a symlink is along the path.

(this should be done elsewhere, but I want it for sshfs now)
 1.32 08-Nov-2007  pooka Make it possible to force attribute/directory cache re-read by
sending SIGHUP to mount_psshfs.
 1.31 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.30 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.29 08-Sep-2007  pooka Free longname in all error branches. CID: 4545
 1.28 25-Aug-2007  pooka branches: 1.28.2;
error branch management. CID 4503
 1.27 25-Aug-2007  pooka jump to correct error branch. CID 4500
 1.26 23-Aug-2007  pooka Prevent crash in case there is more than one reader for the same
directory concurrently. Might need to revisit the method used here
later, though.
 1.25 21-Jun-2007  pooka print warning if directory cache invalidation fails
 1.24 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.23 20-May-2007  pooka In case we are really tight on vnodes, the directory vnode might
be reclaimed from under while we are warming the getattr cache.
Shuffle some code to prevent the effects. Theoretically the race
is still possible, but I don't think it will happen in practice.
In any case, the code could benefit from some more dusting.
 1.22 20-May-2007  pooka Observe that when doing ls -l, the attributes of the first file
getattr are usually still outstanding when we already would like
the result. Instead of issueing another stat which will be serviced
only after all the other entries in the directory, record all the
outgoing readdir getattr buffers and if we encounter an outstanding
request when we need to fetch attrs, do a puffs_framev_framebuf_ccpromote()
wait for it instead of firing off the second query. This shaves
almost 10% off the time for ls -lR.

Also, get rid of the SUPERREADDIR conditional, since it has penetrated
the code quite a bit and the #ifdef SUPERREADDIRs were starting to
look like tagliatelle alla bolognese (n.b. I love how it looks,
but I wouldn't like it either if my tagliatelle alla bolognese
looked like psshfs code). Maybe it should be re-introduced in the
form of a switch?
 1.21 20-May-2007  pooka Implement SUPERREADDIR (like nfs readdirplus) getattr cache warming
a bit differently: when reading the directory, store all getattr
caching queries and fire off only when the directory read is
complete. That way the common sequence is not [readdir, lots of
async getattr requests, readdir EOF] but rather [readdir, readdir
EOF, lots of async getattr]. This speeds up ls -lR by about 25%
(on my LAN).
 1.20 18-May-2007  pooka remove obvious incorrect assert() from doreclaim() and remove the
whole PSN_NUKED bit - it's not very useful because of the noref setback.
 1.19 18-May-2007  pooka * use NOREF setback to prompt immediate (well, once the kernel
reference count goes to 0) reclaim of deleted nodes as opposed to
waiting for the system to start reclaiming the freelist
* combine some nodeflags from different variable to one status variable
 1.18 16-May-2007  pooka Add error parameter to puffs_framev_cb to signal if there is a
result of if the function should just do resource cleanup.
 1.17 15-May-2007  pooka remember to free longname if getting vattr from the message fails

CID 4486
 1.16 15-May-2007  pooka adapt to "step 3" of puffs_framebuf changes
 1.15 11-May-2007  pooka adapt to puffs_framebuf changes
 1.14 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.13 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.12 22-Mar-2007  pooka 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.
 1.11 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.10 27-Feb-2007  pooka one more size_t -> uint32_t
 1.9 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.8 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.7 15-Jan-2007  pooka * adapt to libpuffs path changes
* fix bug in rename
 1.6 11-Jan-2007  pooka 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.
 1.5 09-Jan-2007  pooka Invalidate kernel name cache for a directory when (re-)reading
directory contents from the server.
 1.4 09-Jan-2007  pooka Mark invalid attributes as invalid. Fixes stuff such a cp'ing files
when cp uses mmap(). Also makes attributes appear correct.
 1.3 07-Jan-2007  pooka properly carry fileid for directory entries, fixes pwd
 1.2 07-Jan-2007  pooka fix link count calculation for directories
 1.1 29-Dec-2006  pooka puffs sshfs, an sshfs implementation built on top of the puffs
continuation framework
 1.28.2.2 09-Jan-2008  matt sync with HEAD
 1.28.2.1 06-Nov-2007  matt sync with HEAD
 1.50.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.50.6.1 16-Jan-2013  yamt sync with (a bit old) head
 1.5 08-Nov-2015  christos Some of the puffs mount programs don't need RUMP, re-enable them.
 1.4 06-Aug-2010  pooka If compiled with RUMP_ACTION, access rump kernel instead of host
kernel. This is an easy way to browse & modify the sysctl tree
offered by a rump kernel instance.
 1.3 22-Apr-2009  lukem Enable WARNS=4 by default, except for:
cpuctl dumplfs hprop ipf iprop-log kadmin kcm kdc kdigest
kimpersonate kstash ktutil makefs ndbootd ntp pppd quot
racoon racoonctl rtadvd sntp sup tcpdchk tcpdmatch tcpdump
traceroute traceroute6 user veriexecgen wsmoused zic
(Mostly third-party applications)
 1.2 10-Aug-2007  pooka branches: 1.2.16;
add mount_sysctlfs.8
 1.1 09-Aug-2007  pooka move sysctlfs from examples to base
 1.2.16.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.3 11-Apr-2010  wiz Sort options in SYNOPSIS (flags without arguments first).
 1.2 11-Apr-2010  pooka Add raw mode, which skips ASCII'ification and can be used if reading
structures from the kernel into debug program memory is desired.
 1.1 10-Aug-2007  pooka add mount_sysctlfs.8
 1.21 02-Apr-2023  ryo add missing '\n'
 1.20 23-Nov-2016  christos nothing is executable.
 1.19 23-Nov-2016  christos - protect against node not found SEGV
- fix reversed logic; if we find it in the cache we return it, otherwise
we create it.
 1.18 12-Nov-2015  christos branches: 1.18.2;
Add usage function, various cosmetics; no functional change.
 1.17 04-Nov-2012  christos add the headers you need
 1.16 06-Aug-2010  pooka branches: 1.16.6; 1.16.12;
support CTLTYPE_BOOL
 1.15 06-Aug-2010  pooka If compiled with RUMP_ACTION, access rump kernel instead of host
kernel. This is an easy way to browse & modify the sysctl tree
offered by a rump kernel instance.
 1.14 11-Apr-2010  pooka Add raw mode, which skips ASCII'ification and can be used if reading
structures from the kernel into debug program memory is desired.
 1.13 11-Apr-2010  pooka Instead of totally giving up, dump CTLTYPE_STRUCT as hex, much
like sysctl -x (but not fancy like -dosequis).
 1.12 05-Nov-2009  pooka more lp64 it's-a-sign! fixes
 1.11 28-May-2009  njoly Fix a crash while trying to read nodes on amd64, reported in PR/41494,
by not doing any transfert when offset exceed the actual data length.

From and ok by pooka@.
 1.10 18-Jan-2009  lukem fix -Wsign-compare issues
 1.9 12-Sep-2008  christos branches: 1.9.4; 1.9.6;
fix more A0
 1.8 30-Nov-2007  pooka branches: 1.8.8;
Rototill.

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.
 1.7 27-Nov-2007  pooka Remove "puffs_cid" from the puffs interface following l-removal
from the kernel vfs interfaces. puffs_cc_getcaller(pcc) can be
used now should the same information be desired.
 1.6 16-Nov-2007  pooka use puffs_daemon() instead of daemon()
 1.5 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.4 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.3 10-Aug-2007  pooka branches: 1.3.2;
* use more sensible perms
* use mounter uid/gid as file owners
* sprinkle static
 1.2 09-Aug-2007  pooka __RCSID police
 1.1 09-Aug-2007  pooka move sysctlfs from examples to base
 1.3.2.2 09-Jan-2008  matt sync with HEAD
 1.3.2.1 06-Nov-2007  matt sync with HEAD
 1.8.8.1 24-Sep-2008  wrstuden Merge in changes between wrstuden-revivesa-base-2 and
wrstuden-revivesa-base-3.
 1.9.6.1 30-May-2009  snj branches: 1.9.6.1.2;
Pull up following revision(s) (requested by njoly in ticket #783):
usr.sbin/puffs/mount_sysctlfs/sysctlfs.c: revision 1.11
Fix a crash while trying to read nodes on amd64, reported in PR/41494,
by not doing any transfert when offset exceed the actual data length.
From and ok by pooka@.
 1.9.6.1.2.1 21-Apr-2010  matt sync to netbsd-5
 1.9.4.1 30-May-2009  snj Pull up following revision(s) (requested by njoly in ticket #783):
usr.sbin/puffs/mount_sysctlfs/sysctlfs.c: revision 1.11
Fix a crash while trying to read nodes on amd64, reported in PR/41494,
by not doing any transfert when offset exceed the actual data length.
From and ok by pooka@.
 1.16.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.16.6.1 16-Jan-2013  yamt sync with (a bit old) head
 1.18.2.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.1 29-Apr-2010  pooka Add rump_au-naturel, which instead of mounting a file system inside
the rump kernel just attaches to / in said rump kernel instance.
This is mostly useful in case wanting to see what nodes components
create (see Makefile).

not built without manual intervention
 1.2 22-Nov-2010  pooka these files are no longer autogenerated, so remove them
 1.1 21-Nov-2010  pooka regen
 1.2 12-Oct-2024  bad white space police
 1.1 29-Apr-2010  pooka branches: 1.1.58;
Add rump_au-naturel, which instead of mounting a file system inside
the rump kernel just attaches to / in said rump kernel instance.
This is mostly useful in case wanting to see what nodes components
create (see Makefile).

not built without manual intervention
 1.1.58.1 02-Aug-2025  perseant Sync with HEAD
 1.3 25-Jan-2010  pooka Define concept "disk based file system" and flag appropriate file
systems as such.
 1.2 05-Aug-2008  pooka branches: 1.2.2;
Refactor mount utilities to provide a mount_fs_parseargs() routine.
Use this routine both in mount_fs and rump_fs to provide equivalent
command line parameters and therefore usage interchangeability.
While doing this, combine some common mountgoop to mountprog.h
 1.1 29-Jul-2008  pooka Install rump libraries and utilities to the base system and remove the
private non-installed build infrastructure from sys/rump.

breakdown of commit:
* install relevant headers into /usr/include/rump
* build sys/rump/librump/rumpuser and sys/rump/librump/rumpkern
from src/lib and install as librumpuser and librump, respectively
+ this retains the ability to test a librump build with just the
kernel sources at hand
* move sys/rump/fs/lib/libukfs and sys/rump/fs/lib/libp2k to src/lib
for general consumption, they are not kernel-space dwellers anyway
* build and install sys/rump/fs/lib/lib$fs as librumpfs_$fs
* add chapter 3 manual pages for rump, rumpuser, ukfs and p2k
* build and install userspace kernel file system daemons if MKPUFFS=yes
is spexified
* retire fsconsole for now, it will make a comeback with an actually
implemented version shortly
 1.2.2.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.2.1 05-Aug-2008  wrstuden file Makefile was added on branch wrstuden-revivesa on 2008-09-18 04:30:11 +0000
 1.13 24-Jul-2011  uch regen
 1.12 22-Nov-2010  pooka regen
 1.11 22-Nov-2010  pooka regen
 1.10 21-Nov-2010  pooka regen
 1.9 31-Mar-2010  pooka regen
 1.8 15-Feb-2009  pooka regen: putter in synopsis and note about experimental status
 1.7 10-Feb-2009  pooka regen: note that vnconfig not required
 1.6 11-Jan-2009  wiz branches: 1.6.2;
regen.
 1.5 11-Jan-2009  pooka regen: mount -o rump
 1.4 16-Oct-2008  pooka branches: 1.4.2;
regen
 1.3 05-Sep-2008  wiz branches: 1.3.2;
regen
 1.2 06-Aug-2008  pooka add comment stating that the manpage is generated
 1.1 06-Aug-2008  pooka Add manual pages for rump file system servers.
 1.3.2.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.3.2.1 05-Sep-2008  wrstuden file rump_cd9660.8 was added on branch wrstuden-revivesa on 2008-09-18 04:30:11 +0000
 1.4.2.1 23-Feb-2009  snj Regen for ticket 465.
 1.6.2.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.8 30-May-2010  dholland Requires sys/param.h.
 1.7 13-Dec-2009  pooka Call ukfs_part_release(). For completeness and educational value.
 1.6 03-Dec-2009  pooka Adapt ukfs users to the new ukfs_part interface.
 1.5 07-Oct-2009  pooka Support disklabels.
 1.4 04-Sep-2008  pooka branches: 1.4.2;
Use mntflags handed to us by parseargs() instead of hardcoded MNT_RDONLY.
 1.3 04-Sep-2008  pooka adjust copyright to match reality. no functional change.
 1.2 05-Aug-2008  pooka Refactor mount utilities to provide a mount_fs_parseargs() routine.
Use this routine both in mount_fs and rump_fs to provide equivalent
command line parameters and therefore usage interchangeability.
While doing this, combine some common mountgoop to mountprog.h
 1.1 29-Jul-2008  pooka Install rump libraries and utilities to the base system and remove the
private non-installed build infrastructure from sys/rump.

breakdown of commit:
* install relevant headers into /usr/include/rump
* build sys/rump/librump/rumpuser and sys/rump/librump/rumpkern
from src/lib and install as librumpuser and librump, respectively
+ this retains the ability to test a librump build with just the
kernel sources at hand
* move sys/rump/fs/lib/libukfs and sys/rump/fs/lib/libp2k to src/lib
for general consumption, they are not kernel-space dwellers anyway
* build and install sys/rump/fs/lib/lib$fs as librumpfs_$fs
* add chapter 3 manual pages for rump, rumpuser, ukfs and p2k
* build and install userspace kernel file system daemons if MKPUFFS=yes
is spexified
* retire fsconsole for now, it will make a comeback with an actually
implemented version shortly
 1.4.2.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.4.2.1 04-Sep-2008  wrstuden file rump_cd9660.c was added on branch wrstuden-revivesa on 2008-09-18 04:30:11 +0000
 1.3 25-Jan-2010  pooka Define concept "disk based file system" and flag appropriate file
systems as such.
 1.2 05-Aug-2008  pooka branches: 1.2.2;
Refactor mount utilities to provide a mount_fs_parseargs() routine.
Use this routine both in mount_fs and rump_fs to provide equivalent
command line parameters and therefore usage interchangeability.
While doing this, combine some common mountgoop to mountprog.h
 1.1 29-Jul-2008  pooka Install rump libraries and utilities to the base system and remove the
private non-installed build infrastructure from sys/rump.

breakdown of commit:
* install relevant headers into /usr/include/rump
* build sys/rump/librump/rumpuser and sys/rump/librump/rumpkern
from src/lib and install as librumpuser and librump, respectively
+ this retains the ability to test a librump build with just the
kernel sources at hand
* move sys/rump/fs/lib/libukfs and sys/rump/fs/lib/libp2k to src/lib
for general consumption, they are not kernel-space dwellers anyway
* build and install sys/rump/fs/lib/lib$fs as librumpfs_$fs
* add chapter 3 manual pages for rump, rumpuser, ukfs and p2k
* build and install userspace kernel file system daemons if MKPUFFS=yes
is spexified
* retire fsconsole for now, it will make a comeback with an actually
implemented version shortly
 1.2.2.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.2.1 05-Aug-2008  wrstuden file Makefile was added on branch wrstuden-revivesa on 2008-09-18 04:30:11 +0000
 1.13 24-Jul-2011  uch regen
 1.12 22-Nov-2010  pooka regen
 1.11 22-Nov-2010  pooka regen
 1.10 21-Nov-2010  pooka regen
 1.9 31-Mar-2010  pooka regen
 1.8 15-Feb-2009  pooka regen: putter in synopsis and note about experimental status
 1.7 10-Feb-2009  pooka regen: note that vnconfig not required
 1.6 11-Jan-2009  wiz branches: 1.6.2;
regen.
 1.5 11-Jan-2009  pooka regen: mount -o rump
 1.4 16-Oct-2008  pooka branches: 1.4.2;
regen
 1.3 05-Sep-2008  wiz branches: 1.3.2;
regen
 1.2 06-Aug-2008  pooka add comment stating that the manpage is generated
 1.1 06-Aug-2008  pooka Add manual pages for rump file system servers.
 1.3.2.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.3.2.1 05-Sep-2008  wrstuden file rump_efs.8 was added on branch wrstuden-revivesa on 2008-09-18 04:30:11 +0000
 1.4.2.1 23-Feb-2009  snj Regen for ticket 465.
 1.6.2.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.6 13-Dec-2009  pooka Call ukfs_part_release(). For completeness and educational value.
 1.5 03-Dec-2009  pooka Adapt ukfs users to the new ukfs_part interface.
 1.4 07-Oct-2009  pooka Support disklabels.
 1.3 04-Sep-2008  pooka branches: 1.3.2;
adjust copyright to match reality. no functional change.
 1.2 05-Aug-2008  pooka Refactor mount utilities to provide a mount_fs_parseargs() routine.
Use this routine both in mount_fs and rump_fs to provide equivalent
command line parameters and therefore usage interchangeability.
While doing this, combine some common mountgoop to mountprog.h
 1.1 29-Jul-2008  pooka Install rump libraries and utilities to the base system and remove the
private non-installed build infrastructure from sys/rump.

breakdown of commit:
* install relevant headers into /usr/include/rump
* build sys/rump/librump/rumpuser and sys/rump/librump/rumpkern
from src/lib and install as librumpuser and librump, respectively
+ this retains the ability to test a librump build with just the
kernel sources at hand
* move sys/rump/fs/lib/libukfs and sys/rump/fs/lib/libp2k to src/lib
for general consumption, they are not kernel-space dwellers anyway
* build and install sys/rump/fs/lib/lib$fs as librumpfs_$fs
* add chapter 3 manual pages for rump, rumpuser, ukfs and p2k
* build and install userspace kernel file system daemons if MKPUFFS=yes
is spexified
* retire fsconsole for now, it will make a comeback with an actually
implemented version shortly
 1.3.2.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.3.2.1 04-Sep-2008  wrstuden file rump_efs.c was added on branch wrstuden-revivesa on 2008-09-18 04:30:11 +0000
 1.6 25-Jan-2010  pooka Define concept "disk based file system" and flag appropriate file
systems as such.
 1.5 02-May-2009  pooka Merge librumpfs_ufs into librumpfs_ffs. This reflects what happened
with the ffs kernel module and follows the trend of retiring ufs.
It also allows to get rid of a special case kludge in runtime module
loading, since ufs was not really a module. librumpfs_ufs is now
obsoleted and ffs consumers should be linked solely against
librumpfs_ffs.
 1.4 30-Dec-2008  pooka branches: 1.4.2;
Link self-contained file systems (i.e. do not depend on other file
systems) against the kernel module on select archs.
 1.3 26-Nov-2008  pooka Dynamically load ext2 support, since the linker can't handle more
that one file system module (ext2fs uses both ffs and itself).
 1.2 05-Aug-2008  pooka branches: 1.2.2;
Refactor mount utilities to provide a mount_fs_parseargs() routine.
Use this routine both in mount_fs and rump_fs to provide equivalent
command line parameters and therefore usage interchangeability.
While doing this, combine some common mountgoop to mountprog.h
 1.1 29-Jul-2008  pooka Install rump libraries and utilities to the base system and remove the
private non-installed build infrastructure from sys/rump.

breakdown of commit:
* install relevant headers into /usr/include/rump
* build sys/rump/librump/rumpuser and sys/rump/librump/rumpkern
from src/lib and install as librumpuser and librump, respectively
+ this retains the ability to test a librump build with just the
kernel sources at hand
* move sys/rump/fs/lib/libukfs and sys/rump/fs/lib/libp2k to src/lib
for general consumption, they are not kernel-space dwellers anyway
* build and install sys/rump/fs/lib/lib$fs as librumpfs_$fs
* add chapter 3 manual pages for rump, rumpuser, ukfs and p2k
* build and install userspace kernel file system daemons if MKPUFFS=yes
is spexified
* retire fsconsole for now, it will make a comeback with an actually
implemented version shortly
 1.2.2.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.2.1 05-Aug-2008  wrstuden file Makefile was added on branch wrstuden-revivesa on 2008-09-18 04:30:11 +0000
 1.4.2.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.13 24-Jul-2011  uch regen
 1.12 22-Nov-2010  pooka regen
 1.11 22-Nov-2010  pooka regen
 1.10 21-Nov-2010  pooka regen
 1.9 31-Mar-2010  pooka regen
 1.8 15-Feb-2009  pooka regen: putter in synopsis and note about experimental status
 1.7 10-Feb-2009  pooka regen: note that vnconfig not required
 1.6 11-Jan-2009  wiz branches: 1.6.2;
regen.
 1.5 11-Jan-2009  pooka regen: mount -o rump
 1.4 16-Oct-2008  pooka branches: 1.4.2;
regen
 1.3 05-Sep-2008  wiz branches: 1.3.2;
regen
 1.2 06-Aug-2008  pooka add comment stating that the manpage is generated
 1.1 06-Aug-2008  pooka Add manual pages for rump file system servers.
 1.3.2.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.3.2.1 05-Sep-2008  wrstuden file rump_ext2fs.8 was added on branch wrstuden-revivesa on 2008-09-18 04:30:11 +0000
 1.4.2.1 23-Feb-2009  snj Regen for ticket 465.
 1.6.2.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.9 12-Jan-2010  pooka Make r/w servers unmount themselves cleanly upon receiving SIGINT/TERM.
 1.8 13-Dec-2009  pooka Call ukfs_part_release(). For completeness and educational value.
 1.7 03-Dec-2009  pooka Adapt ukfs users to the new ukfs_part interface.
 1.6 07-Oct-2009  pooka Support disklabels.
 1.5 07-Oct-2009  pooka No need to ukfs_modload() ext2fs anymore.
 1.4 26-Nov-2008  pooka Dynamically load ext2 support, since the linker can't handle more
that one file system module (ext2fs uses both ffs and itself).
 1.3 04-Sep-2008  pooka branches: 1.3.2;
adjust copyright to match reality. no functional change.
 1.2 05-Aug-2008  pooka Refactor mount utilities to provide a mount_fs_parseargs() routine.
Use this routine both in mount_fs and rump_fs to provide equivalent
command line parameters and therefore usage interchangeability.
While doing this, combine some common mountgoop to mountprog.h
 1.1 29-Jul-2008  pooka Install rump libraries and utilities to the base system and remove the
private non-installed build infrastructure from sys/rump.

breakdown of commit:
* install relevant headers into /usr/include/rump
* build sys/rump/librump/rumpuser and sys/rump/librump/rumpkern
from src/lib and install as librumpuser and librump, respectively
+ this retains the ability to test a librump build with just the
kernel sources at hand
* move sys/rump/fs/lib/libukfs and sys/rump/fs/lib/libp2k to src/lib
for general consumption, they are not kernel-space dwellers anyway
* build and install sys/rump/fs/lib/lib$fs as librumpfs_$fs
* add chapter 3 manual pages for rump, rumpuser, ukfs and p2k
* build and install userspace kernel file system daemons if MKPUFFS=yes
is spexified
* retire fsconsole for now, it will make a comeback with an actually
implemented version shortly
 1.3.2.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.3.2.1 04-Sep-2008  wrstuden file rump_ext2fs.c was added on branch wrstuden-revivesa on 2008-09-18 04:30:11 +0000
 1.1 31-Jul-2009  pooka rump_fdesc. it works, but it's actually not very sexy out of
developer clothes, since the server cannot fetch the fd information
from the kernel. Therefore, don't build it by default.
 1.6 24-Jul-2011  uch regen
 1.5 22-Nov-2010  pooka regen
 1.4 22-Nov-2010  pooka regen
 1.3 21-Nov-2010  pooka regen
 1.2 31-Mar-2010  pooka regen
 1.1 31-Jul-2009  pooka rump_fdesc. it works, but it's actually not very sexy out of
developer clothes, since the server cannot fetch the fd information
from the kernel. Therefore, don't build it by default.
 1.1 31-Jul-2009  pooka rump_fdesc. it works, but it's actually not very sexy out of
developer clothes, since the server cannot fetch the fd information
from the kernel. Therefore, don't build it by default.
 1.5 25-Jan-2010  pooka Define concept "disk based file system" and flag appropriate file
systems as such.
 1.4 02-May-2009  pooka Merge librumpfs_ufs into librumpfs_ffs. This reflects what happened
with the ffs kernel module and follows the trend of retiring ufs.
It also allows to get rid of a special case kludge in runtime module
loading, since ufs was not really a module. librumpfs_ufs is now
obsoleted and ffs consumers should be linked solely against
librumpfs_ffs.
 1.3 30-Dec-2008  pooka branches: 1.3.2;
Link self-contained file systems (i.e. do not depend on other file
systems) against the kernel module on select archs.
 1.2 05-Aug-2008  pooka branches: 1.2.2;
Refactor mount utilities to provide a mount_fs_parseargs() routine.
Use this routine both in mount_fs and rump_fs to provide equivalent
command line parameters and therefore usage interchangeability.
While doing this, combine some common mountgoop to mountprog.h
 1.1 29-Jul-2008  pooka Install rump libraries and utilities to the base system and remove the
private non-installed build infrastructure from sys/rump.

breakdown of commit:
* install relevant headers into /usr/include/rump
* build sys/rump/librump/rumpuser and sys/rump/librump/rumpkern
from src/lib and install as librumpuser and librump, respectively
+ this retains the ability to test a librump build with just the
kernel sources at hand
* move sys/rump/fs/lib/libukfs and sys/rump/fs/lib/libp2k to src/lib
for general consumption, they are not kernel-space dwellers anyway
* build and install sys/rump/fs/lib/lib$fs as librumpfs_$fs
* add chapter 3 manual pages for rump, rumpuser, ukfs and p2k
* build and install userspace kernel file system daemons if MKPUFFS=yes
is spexified
* retire fsconsole for now, it will make a comeback with an actually
implemented version shortly
 1.2.2.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.2.1 05-Aug-2008  wrstuden file Makefile was added on branch wrstuden-revivesa on 2008-09-18 04:30:11 +0000
 1.3.2.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.13 24-Jul-2011  uch regen
 1.12 22-Nov-2010  pooka regen
 1.11 22-Nov-2010  pooka regen
 1.10 21-Nov-2010  pooka regen
 1.9 31-Mar-2010  pooka regen
 1.8 15-Feb-2009  pooka regen: putter in synopsis and note about experimental status
 1.7 10-Feb-2009  pooka regen: note that vnconfig not required
 1.6 11-Jan-2009  wiz branches: 1.6.2;
regen.
 1.5 11-Jan-2009  pooka regen: mount -o rump
 1.4 16-Oct-2008  pooka branches: 1.4.2;
regen
 1.3 05-Sep-2008  wiz branches: 1.3.2;
regen
 1.2 06-Aug-2008  pooka add comment stating that the manpage is generated
 1.1 06-Aug-2008  pooka Add manual pages for rump file system servers.
 1.3.2.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.3.2.1 05-Sep-2008  wrstuden file rump_ffs.8 was added on branch wrstuden-revivesa on 2008-09-18 04:30:11 +0000
 1.4.2.1 23-Feb-2009  snj Regen for ticket 465.
 1.6.2.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.7 12-Jan-2010  pooka Make r/w servers unmount themselves cleanly upon receiving SIGINT/TERM.
 1.6 13-Dec-2009  pooka Call ukfs_part_release(). For completeness and educational value.
 1.5 03-Dec-2009  pooka Adapt ukfs users to the new ukfs_part interface.
 1.4 07-Oct-2009  pooka Support disklabels.
 1.3 04-Sep-2008  pooka branches: 1.3.2;
adjust copyright to match reality. no functional change.
 1.2 05-Aug-2008  pooka Refactor mount utilities to provide a mount_fs_parseargs() routine.
Use this routine both in mount_fs and rump_fs to provide equivalent
command line parameters and therefore usage interchangeability.
While doing this, combine some common mountgoop to mountprog.h
 1.1 29-Jul-2008  pooka Install rump libraries and utilities to the base system and remove the
private non-installed build infrastructure from sys/rump.

breakdown of commit:
* install relevant headers into /usr/include/rump
* build sys/rump/librump/rumpuser and sys/rump/librump/rumpkern
from src/lib and install as librumpuser and librump, respectively
+ this retains the ability to test a librump build with just the
kernel sources at hand
* move sys/rump/fs/lib/libukfs and sys/rump/fs/lib/libp2k to src/lib
for general consumption, they are not kernel-space dwellers anyway
* build and install sys/rump/fs/lib/lib$fs as librumpfs_$fs
* add chapter 3 manual pages for rump, rumpuser, ukfs and p2k
* build and install userspace kernel file system daemons if MKPUFFS=yes
is spexified
* retire fsconsole for now, it will make a comeback with an actually
implemented version shortly
 1.3.2.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.3.2.1 04-Sep-2008  wrstuden file rump_ffs.c was added on branch wrstuden-revivesa on 2008-09-18 04:30:11 +0000
 1.4 25-Jan-2010  pooka Define concept "disk based file system" and flag appropriate file
systems as such.
 1.3 03-Dec-2009  pooka remove unnecessary LDADD
 1.2 05-Aug-2008  pooka branches: 1.2.2;
Refactor mount utilities to provide a mount_fs_parseargs() routine.
Use this routine both in mount_fs and rump_fs to provide equivalent
command line parameters and therefore usage interchangeability.
While doing this, combine some common mountgoop to mountprog.h
 1.1 29-Jul-2008  pooka Install rump libraries and utilities to the base system and remove the
private non-installed build infrastructure from sys/rump.

breakdown of commit:
* install relevant headers into /usr/include/rump
* build sys/rump/librump/rumpuser and sys/rump/librump/rumpkern
from src/lib and install as librumpuser and librump, respectively
+ this retains the ability to test a librump build with just the
kernel sources at hand
* move sys/rump/fs/lib/libukfs and sys/rump/fs/lib/libp2k to src/lib
for general consumption, they are not kernel-space dwellers anyway
* build and install sys/rump/fs/lib/lib$fs as librumpfs_$fs
* add chapter 3 manual pages for rump, rumpuser, ukfs and p2k
* build and install userspace kernel file system daemons if MKPUFFS=yes
is spexified
* retire fsconsole for now, it will make a comeback with an actually
implemented version shortly
 1.2.2.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.2.1 05-Aug-2008  wrstuden file Makefile was added on branch wrstuden-revivesa on 2008-09-18 04:30:12 +0000
 1.13 24-Jul-2011  uch regen
 1.12 22-Nov-2010  pooka regen
 1.11 22-Nov-2010  pooka regen
 1.10 21-Nov-2010  pooka regen
 1.9 31-Mar-2010  pooka regen
 1.8 15-Feb-2009  pooka regen: putter in synopsis and note about experimental status
 1.7 10-Feb-2009  pooka regen: note that vnconfig not required
 1.6 11-Jan-2009  wiz branches: 1.6.2;
regen.
 1.5 11-Jan-2009  pooka regen: mount -o rump
 1.4 16-Oct-2008  pooka branches: 1.4.2;
regen
 1.3 05-Sep-2008  wiz branches: 1.3.2;
regen
 1.2 06-Aug-2008  pooka add comment stating that the manpage is generated
 1.1 06-Aug-2008  pooka Add manual pages for rump file system servers.
 1.3.2.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.3.2.1 05-Sep-2008  wrstuden file rump_hfs.8 was added on branch wrstuden-revivesa on 2008-09-18 04:30:12 +0000
 1.4.2.1 23-Feb-2009  snj Regen for ticket 465.
 1.6.2.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.6 13-Dec-2009  pooka Call ukfs_part_release(). For completeness and educational value.
 1.5 03-Dec-2009  pooka Adapt ukfs users to the new ukfs_part interface.
 1.4 07-Oct-2009  pooka Support disklabels.
 1.3 04-Sep-2008  pooka branches: 1.3.2;
adjust copyright to match reality. no functional change.
 1.2 05-Aug-2008  pooka Refactor mount utilities to provide a mount_fs_parseargs() routine.
Use this routine both in mount_fs and rump_fs to provide equivalent
command line parameters and therefore usage interchangeability.
While doing this, combine some common mountgoop to mountprog.h
 1.1 29-Jul-2008  pooka Install rump libraries and utilities to the base system and remove the
private non-installed build infrastructure from sys/rump.

breakdown of commit:
* install relevant headers into /usr/include/rump
* build sys/rump/librump/rumpuser and sys/rump/librump/rumpkern
from src/lib and install as librumpuser and librump, respectively
+ this retains the ability to test a librump build with just the
kernel sources at hand
* move sys/rump/fs/lib/libukfs and sys/rump/fs/lib/libp2k to src/lib
for general consumption, they are not kernel-space dwellers anyway
* build and install sys/rump/fs/lib/lib$fs as librumpfs_$fs
* add chapter 3 manual pages for rump, rumpuser, ukfs and p2k
* build and install userspace kernel file system daemons if MKPUFFS=yes
is spexified
* retire fsconsole for now, it will make a comeback with an actually
implemented version shortly
 1.3.2.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.3.2.1 04-Sep-2008  wrstuden file rump_hfs.c was added on branch wrstuden-revivesa on 2008-09-18 04:30:12 +0000
 1.1 31-Mar-2010  pooka Add kernfs server.

Don't build & install it by default, since it represents the state
of the rump virtual kernel and not the host kernel. However, it's
useful for debugging kernfs.
 1.6 24-Jul-2011  uch regen
 1.5 22-Nov-2010  pooka regen
 1.4 22-Nov-2010  pooka regen
 1.3 21-Nov-2010  pooka regen
 1.2 31-Mar-2010  pooka regen
 1.1 31-Mar-2010  pooka generate
 1.1 31-Mar-2010  pooka Add kernfs server.

Don't build & install it by default, since it represents the state
of the rump virtual kernel and not the host kernel. However, it's
useful for debugging kernfs.
 1.12 07-Sep-2020  mrg remove GCC_NO_ADDR_OF_PACKED_MEMBER for several subdir builds
that are now handled by lfs_accessors.h internally.
 1.11 06-Sep-2020  mrg add support for new GCC 9 warnings that may be too much to fix
right now. new address-of-packed-member and format-overflow
warnings have new GCC_NO_ADDR_OF_PACKED_MEMBER amd
GCC_NO_FORMAT_OVERFLOW variables to remove these warnings.

apply to a bunch of the tree. mostly, these are real bugs that
should be fixed, but in many cases, only by removing the 'packed'
attribute from some structure that doesn't really need it. (i
looked at many different ones, and while perhaps 60-80% were
already properly aligned, it wasn't clear to me that the uses
were always coming from sane data vs network alignment, so it
doesn't seem safe to remove packed without careful research for
each affect struct.) clang already warned (and was not erroring)
for many of these cases, but gcc picked up dozens more.
 1.10 04-Mar-2014  joerg Make the abs() use check non-fatal for a bogus use in the LFS cleanerd.
 1.9 06-Sep-2012  riz branches: 1.9.2;
Disable default build of debugging info.
 1.8 25-Jan-2010  pooka branches: 1.8.6;
Define concept "disk based file system" and flag appropriate file
systems as such.
 1.7 05-Nov-2009  pooka Link fs components into binary instead of loading dynamically now
that it's possible (dependency handling changes to rumpuser_dl).
 1.6 06-Aug-2009  pooka run lfs cleaner
 1.5 21-Jul-2009  pooka Make rump_lfs work again: load fs components dynamically instead
of trying to link them in on the command line and get pounded by
link set failage.
 1.4 02-May-2009  pooka Merge librumpfs_ufs into librumpfs_ffs. This reflects what happened
with the ffs kernel module and follows the trend of retiring ufs.
It also allows to get rid of a special case kludge in runtime module
loading, since ufs was not really a module. librumpfs_ufs is now
obsoleted and ffs consumers should be linked solely against
librumpfs_ffs.
 1.3 30-Dec-2008  pooka branches: 1.3.2;
Link self-contained file systems (i.e. do not depend on other file
systems) against the kernel module on select archs.
 1.2 05-Aug-2008  pooka branches: 1.2.2;
Refactor mount utilities to provide a mount_fs_parseargs() routine.
Use this routine both in mount_fs and rump_fs to provide equivalent
command line parameters and therefore usage interchangeability.
While doing this, combine some common mountgoop to mountprog.h
 1.1 29-Jul-2008  pooka Install rump libraries and utilities to the base system and remove the
private non-installed build infrastructure from sys/rump.

breakdown of commit:
* install relevant headers into /usr/include/rump
* build sys/rump/librump/rumpuser and sys/rump/librump/rumpkern
from src/lib and install as librumpuser and librump, respectively
+ this retains the ability to test a librump build with just the
kernel sources at hand
* move sys/rump/fs/lib/libukfs and sys/rump/fs/lib/libp2k to src/lib
for general consumption, they are not kernel-space dwellers anyway
* build and install sys/rump/fs/lib/lib$fs as librumpfs_$fs
* add chapter 3 manual pages for rump, rumpuser, ukfs and p2k
* build and install userspace kernel file system daemons if MKPUFFS=yes
is spexified
* retire fsconsole for now, it will make a comeback with an actually
implemented version shortly
 1.2.2.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.2.1 05-Aug-2008  wrstuden file Makefile was added on branch wrstuden-revivesa on 2008-09-18 04:30:12 +0000
 1.3.2.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.8.6.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.8.6.1 30-Oct-2012  yamt sync with head
 1.9.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.13 24-Jul-2011  uch regen
 1.12 22-Nov-2010  pooka regen
 1.11 22-Nov-2010  pooka regen
 1.10 21-Nov-2010  pooka regen
 1.9 31-Mar-2010  pooka regen
 1.8 15-Feb-2009  pooka regen: putter in synopsis and note about experimental status
 1.7 10-Feb-2009  pooka regen: note that vnconfig not required
 1.6 11-Jan-2009  wiz branches: 1.6.2;
regen.
 1.5 11-Jan-2009  pooka regen: mount -o rump
 1.4 16-Oct-2008  pooka branches: 1.4.2;
regen
 1.3 05-Sep-2008  wiz branches: 1.3.2;
regen
 1.2 06-Aug-2008  pooka add comment stating that the manpage is generated
 1.1 06-Aug-2008  pooka Add manual pages for rump file system servers.
 1.3.2.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.3.2.1 05-Sep-2008  wrstuden file rump_lfs.8 was added on branch wrstuden-revivesa on 2008-09-18 04:30:12 +0000
 1.4.2.1 23-Feb-2009  snj Regen for ticket 465.
 1.6.2.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.19 30-Aug-2019  brad The cleaner is compiled into rump_lfs and executed as a thread. Pass
in the raw device using the new -J option. This avoids the use of
getdiskrawname which is not particularly rump safe in this context and
insures that the rump container device is used for cleaning, not the
outer device.
 1.18 02-Aug-2015  dholland branches: 1.18.16; 1.18.18;
Use the lfs header file and lfs's mount args struct, not ufsmount.h
and the ffs mount args struct, for mounting lfs.

(they are the same, so this doesn't matter yet, but still...)
 1.17 10-Jan-2013  riastradh After mount_lfs_parseargs, reset getopt for lfs_cleaner_main.
 1.16 03-Mar-2010  pooka branches: 1.16.6; 1.16.12;
Give usage() a chance.
XXX: UKFS_DEVICE_ARGVPROBE() interface
 1.15 12-Jan-2010  pooka Make r/w servers unmount themselves cleanly upon receiving SIGINT/TERM.
 1.14 13-Dec-2009  pooka Call ukfs_part_release(). For completeness and educational value.
 1.13 03-Dec-2009  pooka Adapt ukfs users to the new ukfs_part interface.
 1.12 05-Nov-2009  pooka Link fs components into binary instead of loading dynamically now
that it's possible (dependency handling changes to rumpuser_dl).
 1.11 05-Nov-2009  pooka Need to p2k_init() (i.e. fork()) earlier to not lose threads created
in rump_init().
 1.10 18-Oct-2009  pooka adapt to new p2k interfaces
 1.9 14-Oct-2009  pooka Adjust names of external rump control interfaces to match the
new rump_pub namespace.
 1.8 09-Oct-2009  pooka Start cleaner without the sleep(1) hack now that it's possible.
 1.7 07-Oct-2009  pooka Support disklabels.
 1.6 06-Aug-2009  pooka run lfs cleaner
 1.5 21-Jul-2009  pooka don't need absolute paths for fs component names
 1.4 21-Jul-2009  pooka Make rump_lfs work again: load fs components dynamically instead
of trying to link them in on the command line and get pounded by
link set failage.
 1.3 04-Sep-2008  pooka branches: 1.3.2;
adjust copyright to match reality. no functional change.
 1.2 05-Aug-2008  pooka Refactor mount utilities to provide a mount_fs_parseargs() routine.
Use this routine both in mount_fs and rump_fs to provide equivalent
command line parameters and therefore usage interchangeability.
While doing this, combine some common mountgoop to mountprog.h
 1.1 29-Jul-2008  pooka Install rump libraries and utilities to the base system and remove the
private non-installed build infrastructure from sys/rump.

breakdown of commit:
* install relevant headers into /usr/include/rump
* build sys/rump/librump/rumpuser and sys/rump/librump/rumpkern
from src/lib and install as librumpuser and librump, respectively
+ this retains the ability to test a librump build with just the
kernel sources at hand
* move sys/rump/fs/lib/libukfs and sys/rump/fs/lib/libp2k to src/lib
for general consumption, they are not kernel-space dwellers anyway
* build and install sys/rump/fs/lib/lib$fs as librumpfs_$fs
* add chapter 3 manual pages for rump, rumpuser, ukfs and p2k
* build and install userspace kernel file system daemons if MKPUFFS=yes
is spexified
* retire fsconsole for now, it will make a comeback with an actually
implemented version shortly
 1.3.2.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.3.2.1 04-Sep-2008  wrstuden file rump_lfs.c was added on branch wrstuden-revivesa on 2008-09-18 04:30:12 +0000
 1.16.12.1 25-Feb-2013  tls resync with head
 1.16.6.1 23-Jan-2013  yamt sync with head
 1.18.18.1 02-Sep-2019  martin Pull up following revision(s) (requested by brad in ticket #110):

libexec/lfs_cleanerd/lfs_cleanerd.c: revision 1.59
libexec/lfs_cleanerd/lfs_cleanerd.8: revision 1.19
sbin/resize_lfs/resize_lfs.c: revision 1.15
usr.sbin/puffs/rump_lfs/rump_lfs.c: revision 1.19
libexec/lfs_cleanerd/lfs_cleanerd.c: revision 1.60
lib/libutil/getdiskrawname.c: revision 1.6
tests/fs/common/fstest_lfs.c: revision 1.7

Use getdiskrawname to find the device name.
Reviewed by Christos

-

Teach getdiskrawname and getdiskcookedname about zvols.
Reviewed by Christos

-

Add support for passing the raw device name separate from the
filesystem. This is useful in the case where the cleaner is compiled
into code, such as rump_lfs and the ATF tests. This helps to fix
bin/54488

-

The cleaner is compiled into rump_lfs and executed as a thread. Pass
in the raw device using the new -J option. This avoids the use of
getdiskrawname which is not particularly rump safe in this context and
insures that the rump container device is used for cleaning, not the
outer device.
 1.18.16.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.4 25-Jan-2010  pooka Define concept "disk based file system" and flag appropriate file
systems as such.
 1.3 05-Aug-2008  pooka branches: 1.3.2;
Refactor mount utilities to provide a mount_fs_parseargs() routine.
Use this routine both in mount_fs and rump_fs to provide equivalent
command line parameters and therefore usage interchangeability.
While doing this, combine some common mountgoop to mountprog.h
 1.2 29-Jul-2008  pooka Use command line option parsing code from sbin/mount_msdos to
gain equal usage and behaviour with the "real" counterpart.
 1.1 29-Jul-2008  pooka Install rump libraries and utilities to the base system and remove the
private non-installed build infrastructure from sys/rump.

breakdown of commit:
* install relevant headers into /usr/include/rump
* build sys/rump/librump/rumpuser and sys/rump/librump/rumpkern
from src/lib and install as librumpuser and librump, respectively
+ this retains the ability to test a librump build with just the
kernel sources at hand
* move sys/rump/fs/lib/libukfs and sys/rump/fs/lib/libp2k to src/lib
for general consumption, they are not kernel-space dwellers anyway
* build and install sys/rump/fs/lib/lib$fs as librumpfs_$fs
* add chapter 3 manual pages for rump, rumpuser, ukfs and p2k
* build and install userspace kernel file system daemons if MKPUFFS=yes
is spexified
* retire fsconsole for now, it will make a comeback with an actually
implemented version shortly
 1.3.2.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.3.2.1 05-Aug-2008  wrstuden file Makefile was added on branch wrstuden-revivesa on 2008-09-18 04:30:12 +0000
 1.13 24-Jul-2011  uch regen
 1.12 22-Nov-2010  pooka regen
 1.11 22-Nov-2010  pooka regen
 1.10 21-Nov-2010  pooka regen
 1.9 31-Mar-2010  pooka regen
 1.8 15-Feb-2009  pooka regen: putter in synopsis and note about experimental status
 1.7 10-Feb-2009  pooka regen: note that vnconfig not required
 1.6 11-Jan-2009  wiz branches: 1.6.2;
regen.
 1.5 11-Jan-2009  pooka regen: mount -o rump
 1.4 16-Oct-2008  pooka branches: 1.4.2;
regen
 1.3 05-Sep-2008  wiz branches: 1.3.2;
regen
 1.2 06-Aug-2008  pooka add comment stating that the manpage is generated
 1.1 06-Aug-2008  pooka Add manual pages for rump file system servers.
 1.3.2.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.3.2.1 05-Sep-2008  wrstuden file rump_msdos.8 was added on branch wrstuden-revivesa on 2008-09-18 04:30:12 +0000
 1.4.2.1 23-Feb-2009  snj Regen for ticket 465.
 1.6.2.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.8 12-Jan-2010  pooka Make r/w servers unmount themselves cleanly upon receiving SIGINT/TERM.
 1.7 13-Dec-2009  pooka Call ukfs_part_release(). For completeness and educational value.
 1.6 03-Dec-2009  pooka Adapt ukfs users to the new ukfs_part interface.
 1.5 07-Oct-2009  pooka Support disklabels.
 1.4 04-Sep-2008  pooka branches: 1.4.2;
Use the standard practice of canon_dev/dir instead of argv[optind]
 1.3 04-Sep-2008  pooka adjust copyright to match reality. no functional change.
 1.2 29-Jul-2008  pooka Use command line option parsing code from sbin/mount_msdos to
gain equal usage and behaviour with the "real" counterpart.
 1.1 29-Jul-2008  pooka Install rump libraries and utilities to the base system and remove the
private non-installed build infrastructure from sys/rump.

breakdown of commit:
* install relevant headers into /usr/include/rump
* build sys/rump/librump/rumpuser and sys/rump/librump/rumpkern
from src/lib and install as librumpuser and librump, respectively
+ this retains the ability to test a librump build with just the
kernel sources at hand
* move sys/rump/fs/lib/libukfs and sys/rump/fs/lib/libp2k to src/lib
for general consumption, they are not kernel-space dwellers anyway
* build and install sys/rump/fs/lib/lib$fs as librumpfs_$fs
* add chapter 3 manual pages for rump, rumpuser, ukfs and p2k
* build and install userspace kernel file system daemons if MKPUFFS=yes
is spexified
* retire fsconsole for now, it will make a comeback with an actually
implemented version shortly
 1.4.2.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.4.2.1 04-Sep-2008  wrstuden file rump_msdos.c was added on branch wrstuden-revivesa on 2008-09-18 04:30:12 +0000
 1.7 14-Mar-2017  ozaki-r Fix build of puffs
 1.6 20-Jul-2010  pooka branches: 1.6.28; 1.6.32;
Remove unused LDADD lines. They need work to work, and if anyone
ever does that work, they surely can come up with the LDADD line as
well.
 1.5 14-Sep-2009  skrll Rely on the new and "just as awful as the old" hack in the battle of rump
vs link sets.
 1.4 21-Aug-2009  skrll No-one wins in rump vs link sets.

XXX Someone(tm) needs to fix this properly.
 1.3 18-Jan-2009  he Change the use of formally undocumented features, which have now been
made to fail. Specifically, change
.ifdef(SYMBOL) -> .ifdef SYMBOL or .if defined(SYMBOL),
and corresponding for .ifndef.

Also correct one error in lib/libm/Makefile (.ifdef (${MKCOMPLEX} != "no")?!?).
 1.2 30-Dec-2008  pooka Link self-contained file systems (i.e. do not depend on other file
systems) against the kernel module on select archs.
 1.1 16-Oct-2008  pooka Add & enable rump_nfs.
 1.6.32.1 21-Apr-2017  bouyer Sync with HEAD
 1.6.28.1 20-Mar-2017  pgoyette Sync with HEAD
 1.11 24-Jul-2011  uch regen
 1.10 22-Nov-2010  pooka regen
 1.9 22-Nov-2010  pooka regen
 1.8 21-Nov-2010  pooka regen
 1.7 31-Mar-2010  pooka regen
 1.6 15-Feb-2009  pooka regen: putter in synopsis and note about experimental status
 1.5 10-Feb-2009  pooka regen: note that vnconfig not required
 1.4 11-Jan-2009  wiz branches: 1.4.2;
regen.
 1.3 11-Jan-2009  pooka regen: mount -o rump
 1.2 16-Oct-2008  pooka branches: 1.2.2;
regen
 1.1 16-Oct-2008  pooka Add & enable rump_nfs.
 1.2.2.1 23-Feb-2009  snj Regen for ticket 465.
 1.4.2.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.10 12-Jan-2010  pooka Make r/w servers unmount themselves cleanly upon receiving SIGINT/TERM.
 1.9 18-Oct-2009  pooka Remove threading ifdefs. It was never easy to run the nfs client
without threads, but now it's even more difficult due to sillyrename
using workqueue, so whoever wants to do it will have to take to
manual fiddling.
 1.8 18-Oct-2009  pooka Use write through cache here too. Doesn't make the same kind of
difference as with smbfs since nfs is "stateless", but better to
have the data on the server ASAP in case some other nods wants to
use it.
 1.7 11-Jan-2009  pooka Default to threading, non-threaded debug mode can be compiled separately.
Useful if running this from fstab.
 1.6 10-Jan-2009  pooka Don't compile diagnostic code which accesses kernel symbols directly.
Will fail now since not all archs have the same symbol names.
 1.5 08-Jan-2009  pooka For applications which naughtily reach over to the rump kernel
namespace without using proper interfaces, do a little namespace
compensation.
 1.4 12-Dec-2008  pooka Do some nasty manual tricks and treats to avoid having to call
rump_init() here (creating threads before we ask p2k to detach from
console is bad).
 1.3 26-Nov-2008  pooka Try to honor rump_threads by not creating iothreads if threads are off.
 1.2 14-Nov-2008  pooka Don't set PUFFS_FLAG_OPDUMP by default.
 1.1 16-Oct-2008  pooka Add & enable rump_nfs.
 1.1 08-Mar-2010  pooka Not Quite MFS

Instead of copulating with newfs to produce a new FFS image into
memory, mmap() a given existing image and pass that as the backing
store. If -s is given, mmap is done with MAP_SHARED and changes
are kept across mounts, else MAP_COPY (i.e. MAP_PRIVATE for us) is
done and changes are lost when the server exits.

Note: -s does not guarantee any kind of file system safety whatsoever
and in case of kill, crash, exit or other form of elusion,
everything will be, according to our theme, quite screwed.
 1.2 22-Nov-2010  pooka these files are no longer autogenerated, so remove them
 1.1 21-Nov-2010  pooka regen
 1.3 31-Mar-2010  pooka fix typo (at least it was in an error string instead of a comment)
 1.2 31-Mar-2010  pooka MAP_COPY is available only in _KERNEL .... uh, so don't use it here.
 1.1 08-Mar-2010  pooka Not Quite MFS

Instead of copulating with newfs to produce a new FFS image into
memory, mmap() a given existing image and pass that as the backing
store. If -s is given, mmap is done with MAP_SHARED and changes
are kept across mounts, else MAP_COPY (i.e. MAP_PRIVATE for us) is
done and changes are lost when the server exits.

Note: -s does not guarantee any kind of file system safety whatsoever
and in case of kill, crash, exit or other form of elusion,
everything will be, according to our theme, quite screwed.
 1.3 25-Jan-2010  pooka Define concept "disk based file system" and flag appropriate file
systems as such.
 1.2 05-Aug-2008  pooka branches: 1.2.2;
Refactor mount utilities to provide a mount_fs_parseargs() routine.
Use this routine both in mount_fs and rump_fs to provide equivalent
command line parameters and therefore usage interchangeability.
While doing this, combine some common mountgoop to mountprog.h
 1.1 29-Jul-2008  pooka Install rump libraries and utilities to the base system and remove the
private non-installed build infrastructure from sys/rump.

breakdown of commit:
* install relevant headers into /usr/include/rump
* build sys/rump/librump/rumpuser and sys/rump/librump/rumpkern
from src/lib and install as librumpuser and librump, respectively
+ this retains the ability to test a librump build with just the
kernel sources at hand
* move sys/rump/fs/lib/libukfs and sys/rump/fs/lib/libp2k to src/lib
for general consumption, they are not kernel-space dwellers anyway
* build and install sys/rump/fs/lib/lib$fs as librumpfs_$fs
* add chapter 3 manual pages for rump, rumpuser, ukfs and p2k
* build and install userspace kernel file system daemons if MKPUFFS=yes
is spexified
* retire fsconsole for now, it will make a comeback with an actually
implemented version shortly
 1.2.2.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.2.1 05-Aug-2008  wrstuden file Makefile was added on branch wrstuden-revivesa on 2008-09-18 04:30:12 +0000
 1.13 24-Jul-2011  uch regen
 1.12 22-Nov-2010  pooka regen
 1.11 22-Nov-2010  pooka regen
 1.10 21-Nov-2010  pooka regen
 1.9 31-Mar-2010  pooka regen
 1.8 15-Feb-2009  pooka regen: putter in synopsis and note about experimental status
 1.7 10-Feb-2009  pooka regen: note that vnconfig not required
 1.6 11-Jan-2009  wiz branches: 1.6.2;
regen.
 1.5 11-Jan-2009  pooka regen: mount -o rump
 1.4 16-Oct-2008  pooka branches: 1.4.2;
regen
 1.3 05-Sep-2008  wiz branches: 1.3.2;
regen
 1.2 06-Aug-2008  pooka add comment stating that the manpage is generated
 1.1 06-Aug-2008  pooka Add manual pages for rump file system servers.
 1.3.2.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.3.2.1 05-Sep-2008  wrstuden file rump_ntfs.8 was added on branch wrstuden-revivesa on 2008-09-18 04:30:12 +0000
 1.4.2.1 23-Feb-2009  snj Regen for ticket 465.
 1.6.2.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.6 13-Dec-2009  pooka Call ukfs_part_release(). For completeness and educational value.
 1.5 03-Dec-2009  pooka Adapt ukfs users to the new ukfs_part interface.
 1.4 07-Oct-2009  pooka Support disklabels.
 1.3 04-Sep-2008  pooka branches: 1.3.2;
adjust copyright to match reality. no functional change.
 1.2 05-Aug-2008  pooka Refactor mount utilities to provide a mount_fs_parseargs() routine.
Use this routine both in mount_fs and rump_fs to provide equivalent
command line parameters and therefore usage interchangeability.
While doing this, combine some common mountgoop to mountprog.h
 1.1 29-Jul-2008  pooka Install rump libraries and utilities to the base system and remove the
private non-installed build infrastructure from sys/rump.

breakdown of commit:
* install relevant headers into /usr/include/rump
* build sys/rump/librump/rumpuser and sys/rump/librump/rumpkern
from src/lib and install as librumpuser and librump, respectively
+ this retains the ability to test a librump build with just the
kernel sources at hand
* move sys/rump/fs/lib/libukfs and sys/rump/fs/lib/libp2k to src/lib
for general consumption, they are not kernel-space dwellers anyway
* build and install sys/rump/fs/lib/lib$fs as librumpfs_$fs
* add chapter 3 manual pages for rump, rumpuser, ukfs and p2k
* build and install userspace kernel file system daemons if MKPUFFS=yes
is spexified
* retire fsconsole for now, it will make a comeback with an actually
implemented version shortly
 1.3.2.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.3.2.1 04-Sep-2008  wrstuden file rump_ntfs.c was added on branch wrstuden-revivesa on 2008-09-18 04:30:12 +0000
 1.4 30-Jun-2010  pooka link putter now that it's a separate component
 1.3 09-Aug-2008  pooka branches: 1.3.2;
add manpage for rump_syspuffs
 1.2 06-Aug-2008  pooka Add manual pages for rump file system servers.
 1.1 29-Jul-2008  pooka Install rump libraries and utilities to the base system and remove the
private non-installed build infrastructure from sys/rump.

breakdown of commit:
* install relevant headers into /usr/include/rump
* build sys/rump/librump/rumpuser and sys/rump/librump/rumpkern
from src/lib and install as librumpuser and librump, respectively
+ this retains the ability to test a librump build with just the
kernel sources at hand
* move sys/rump/fs/lib/libukfs and sys/rump/fs/lib/libp2k to src/lib
for general consumption, they are not kernel-space dwellers anyway
* build and install sys/rump/fs/lib/lib$fs as librumpfs_$fs
* add chapter 3 manual pages for rump, rumpuser, ukfs and p2k
* build and install userspace kernel file system daemons if MKPUFFS=yes
is spexified
* retire fsconsole for now, it will make a comeback with an actually
implemented version shortly
 1.3.2.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.3.2.1 09-Aug-2008  wrstuden file Makefile was added on branch wrstuden-revivesa on 2008-09-18 04:30:13 +0000
 1.4 14-Nov-2012  njoly Fix mandoc(1) output, use right arrow special character.
 1.3 09-Jun-2009  pooka branches: 1.3.6; 1.3.12;
+pseudo-device putter
 1.2 11-Jan-2009  wiz Make ready for HTML output, add comma.
 1.1 09-Aug-2008  pooka branches: 1.1.2;
add manpage for rump_syspuffs
 1.1.2.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.1.2.1 09-Aug-2008  wrstuden file rump_syspuffs.8 was added on branch wrstuden-revivesa on 2008-09-18 04:30:13 +0000
 1.3.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.3.6.1 16-Jan-2013  yamt sync with (a bit old) head
 1.14 03-Aug-2023  andvar fix typos in comments and one definition, mainly s/sucket/socket/.
 1.13 01-Feb-2019  mrg don't check the return value of execvp() for failure to call err().
assume if it returns at all something has failed.
 1.12 31-Aug-2011  joerg branches: 1.12.42;
Use __dead
 1.11 06-Jul-2010  pooka When using the top secret PUFFS_COMFD model, write out size of the
puffs kernel args before the contents. This allows parties which
have no clue about the contents to proxy the protocol easily.
 1.10 20-Oct-2009  pooka use rump_pub interface name
 1.9 15-Apr-2009  pooka fix WARNS=4, recipe from lukem
 1.8 10-Jan-2009  pooka branches: 1.8.2;
Don't compile diagnostic code which accesses kernel symbols directly.
Will fail now since not all archs have the same symbol names.
 1.7 08-Jan-2009  pooka For applications which naughtily reach over to the rump kernel
namespace without using proper interfaces, do a little namespace
compensation.
 1.6 08-Jan-2009  pooka Put syspuffs_glueinit in the rump kernel namespace.
 1.5 07-Oct-2008  pooka check rump_init() return value
 1.4 02-Sep-2008  pooka branches: 1.4.2;
Make syspuffs mount code supply mount_syspuffs_parseargs() like
the other mount binaries do. Now syspuffs can be used to run all
puffs file systems as utilities. This includes fuse file systems
and becomes interesting with the fs-utils project. We can now do
e.g. this:

ReFUSE ntfs-3g:
golem> echo hello | fsu_write/fsu_write ntfs-3g puffs ~/img/ntfs.img dafile
golem> fsu_cat/fsu_cat ntfs-3g puffs ~/img/ntfs.img dafile
hello
golem>

puffs sysctlfs:
golem> fsu_ls/fsu_ls mount_sysctlfs puffs sysctl -l ddb
total 0
-r-xr-xr-x 1 pooka users 1 Sep 2 22:11 commandonenter
-r-xr-xr-x 1 pooka users 2 Sep 2 22:11 fromconsole
-r-xr-xr-x 1 pooka users 3 Sep 2 22:11 lines
-r-xr-xr-x 1 pooka users 8 Sep 2 22:11 maxoff
-r-xr-xr-x 1 pooka users 3 Sep 2 22:11 maxwidth
-r-xr-xr-x 1 pooka users 2 Sep 2 22:11 onpanic
-r-xr-xr-x 1 pooka users 3 Sep 2 22:11 radix
-r-xr-xr-x 1 pooka users 2 Sep 2 22:11 tabstops
-r-xr-xr-x 1 pooka users 2 Sep 2 22:11 tee_msgbuf

Same works for psshfs etcetc.

In other words, this provides total integration for "normal"
in-kernel file systems and puffs/fuse file systems on the ukfs
library level.

Note: implementation is still "first stab" and the fs-utils usage
will no doubt change.
 1.3 11-Aug-2008  pooka We can actually simply use execvp() instead of /bin/sh for
exec-and-pathsearch-with-environ.
Thanks to bad for pointing this out & apb + blymn for some discussion.
 1.2 08-Aug-2008  pooka exec file server via sh -c to get the benefit of PATH search.
 1.1 29-Jul-2008  pooka Install rump libraries and utilities to the base system and remove the
private non-installed build infrastructure from sys/rump.

breakdown of commit:
* install relevant headers into /usr/include/rump
* build sys/rump/librump/rumpuser and sys/rump/librump/rumpkern
from src/lib and install as librumpuser and librump, respectively
+ this retains the ability to test a librump build with just the
kernel sources at hand
* move sys/rump/fs/lib/libukfs and sys/rump/fs/lib/libp2k to src/lib
for general consumption, they are not kernel-space dwellers anyway
* build and install sys/rump/fs/lib/lib$fs as librumpfs_$fs
* add chapter 3 manual pages for rump, rumpuser, ukfs and p2k
* build and install userspace kernel file system daemons if MKPUFFS=yes
is spexified
* retire fsconsole for now, it will make a comeback with an actually
implemented version shortly
 1.4.2.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.4.2.1 02-Sep-2008  wrstuden file rump_syspuffs.c was added on branch wrstuden-revivesa on 2008-09-18 04:30:13 +0000
 1.8.2.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.12.42.1 10-Jun-2019  christos Sync with HEAD
 1.1 02-Sep-2008  pooka branches: 1.1.2;
add file missed in previous commit
 1.1.2.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.1.2.1 02-Sep-2008  wrstuden file rump_syspuffs.h was added on branch wrstuden-revivesa on 2008-09-18 04:30:13 +0000
 1.3 05-Jan-2009  pooka use kernel module
 1.2 30-Dec-2008  pooka Link self-contained file systems (i.e. do not depend on other file
systems) against the kernel module on select archs.
 1.1 04-Sep-2008  pooka branches: 1.1.2;
Add rump support for sysvbfs.
 1.1.2.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.1.2.1 04-Sep-2008  wrstuden file Makefile was added on branch wrstuden-revivesa on 2008-09-18 04:30:13 +0000
 1.13 24-Jul-2011  uch regen
 1.12 22-Nov-2010  pooka regen
 1.11 22-Nov-2010  pooka regen
 1.10 21-Nov-2010  pooka regen
 1.9 31-Mar-2010  pooka regen
 1.8 15-Feb-2009  pooka regen: putter in synopsis and note about experimental status
 1.7 10-Feb-2009  pooka regen: note that vnconfig not required
 1.6 11-Jan-2009  wiz branches: 1.6.2;
regen.
 1.5 11-Jan-2009  pooka regen: mount -o rump
 1.4 16-Oct-2008  pooka branches: 1.4.2;
regen
 1.3 05-Sep-2008  wiz branches: 1.3.2;
regen
 1.2 05-Sep-2008  wiz Remove weird character.
 1.1 04-Sep-2008  pooka Add rump support for sysvbfs.
 1.3.2.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.3.2.1 05-Sep-2008  wrstuden file rump_sysvbfs.8 was added on branch wrstuden-revivesa on 2008-09-18 04:30:13 +0000
 1.4.2.1 23-Feb-2009  snj Regen for ticket 465.
 1.6.2.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.5 12-Jan-2010  pooka Make r/w servers unmount themselves cleanly upon receiving SIGINT/TERM.
 1.4 13-Dec-2009  pooka Call ukfs_part_release(). For completeness and educational value.
 1.3 03-Dec-2009  pooka Adapt ukfs users to the new ukfs_part interface.
 1.2 07-Oct-2009  pooka Support disklabels.
 1.1 04-Sep-2008  pooka branches: 1.1.2;
Add rump support for sysvbfs.
 1.1.2.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.1.2.1 04-Sep-2008  wrstuden file rump_sysvbfs.c was added on branch wrstuden-revivesa on 2008-09-18 04:30:13 +0000
 1.2 05-Aug-2008  pooka branches: 1.2.2;
Refactor mount utilities to provide a mount_fs_parseargs() routine.
Use this routine both in mount_fs and rump_fs to provide equivalent
command line parameters and therefore usage interchangeability.
While doing this, combine some common mountgoop to mountprog.h
 1.1 29-Jul-2008  pooka Install rump libraries and utilities to the base system and remove the
private non-installed build infrastructure from sys/rump.

breakdown of commit:
* install relevant headers into /usr/include/rump
* build sys/rump/librump/rumpuser and sys/rump/librump/rumpkern
from src/lib and install as librumpuser and librump, respectively
+ this retains the ability to test a librump build with just the
kernel sources at hand
* move sys/rump/fs/lib/libukfs and sys/rump/fs/lib/libp2k to src/lib
for general consumption, they are not kernel-space dwellers anyway
* build and install sys/rump/fs/lib/lib$fs as librumpfs_$fs
* add chapter 3 manual pages for rump, rumpuser, ukfs and p2k
* build and install userspace kernel file system daemons if MKPUFFS=yes
is spexified
* retire fsconsole for now, it will make a comeback with an actually
implemented version shortly
 1.2.2.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.2.1 05-Aug-2008  wrstuden file Makefile was added on branch wrstuden-revivesa on 2008-09-18 04:30:13 +0000
 1.13 24-Jul-2011  uch regen
 1.12 22-Nov-2010  pooka regen
 1.11 22-Nov-2010  pooka regen
 1.10 21-Nov-2010  pooka regen
 1.9 31-Mar-2010  pooka regen
 1.8 15-Feb-2009  pooka regen: putter in synopsis and note about experimental status
 1.7 10-Feb-2009  pooka regen: note that vnconfig not required
 1.6 11-Jan-2009  wiz branches: 1.6.2;
regen.
 1.5 11-Jan-2009  pooka regen: mount -o rump
 1.4 16-Oct-2008  pooka branches: 1.4.2;
regen
 1.3 05-Sep-2008  wiz branches: 1.3.2;
regen
 1.2 06-Aug-2008  pooka add comment stating that the manpage is generated
 1.1 06-Aug-2008  pooka Add manual pages for rump file system servers.
 1.3.2.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.3.2.1 05-Sep-2008  wrstuden file rump_tmpfs.8 was added on branch wrstuden-revivesa on 2008-09-18 04:30:13 +0000
 1.4.2.1 23-Feb-2009  snj Regen for ticket 465.
 1.6.2.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.4 17-Dec-2009  pooka add ranty rant about data storage in tmpfs
 1.3 04-Sep-2008  pooka branches: 1.3.2;
adjust copyright to match reality. no functional change.
 1.2 05-Aug-2008  pooka Refactor mount utilities to provide a mount_fs_parseargs() routine.
Use this routine both in mount_fs and rump_fs to provide equivalent
command line parameters and therefore usage interchangeability.
While doing this, combine some common mountgoop to mountprog.h
 1.1 29-Jul-2008  pooka Install rump libraries and utilities to the base system and remove the
private non-installed build infrastructure from sys/rump.

breakdown of commit:
* install relevant headers into /usr/include/rump
* build sys/rump/librump/rumpuser and sys/rump/librump/rumpkern
from src/lib and install as librumpuser and librump, respectively
+ this retains the ability to test a librump build with just the
kernel sources at hand
* move sys/rump/fs/lib/libukfs and sys/rump/fs/lib/libp2k to src/lib
for general consumption, they are not kernel-space dwellers anyway
* build and install sys/rump/fs/lib/lib$fs as librumpfs_$fs
* add chapter 3 manual pages for rump, rumpuser, ukfs and p2k
* build and install userspace kernel file system daemons if MKPUFFS=yes
is spexified
* retire fsconsole for now, it will make a comeback with an actually
implemented version shortly
 1.3.2.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.3.2.1 04-Sep-2008  wrstuden file rump_tmpfs.c was added on branch wrstuden-revivesa on 2008-09-18 04:30:13 +0000
 1.3 25-Jan-2010  pooka Define concept "disk based file system" and flag appropriate file
systems as such.
 1.2 05-Aug-2008  pooka branches: 1.2.2;
Refactor mount utilities to provide a mount_fs_parseargs() routine.
Use this routine both in mount_fs and rump_fs to provide equivalent
command line parameters and therefore usage interchangeability.
While doing this, combine some common mountgoop to mountprog.h
 1.1 29-Jul-2008  pooka Install rump libraries and utilities to the base system and remove the
private non-installed build infrastructure from sys/rump.

breakdown of commit:
* install relevant headers into /usr/include/rump
* build sys/rump/librump/rumpuser and sys/rump/librump/rumpkern
from src/lib and install as librumpuser and librump, respectively
+ this retains the ability to test a librump build with just the
kernel sources at hand
* move sys/rump/fs/lib/libukfs and sys/rump/fs/lib/libp2k to src/lib
for general consumption, they are not kernel-space dwellers anyway
* build and install sys/rump/fs/lib/lib$fs as librumpfs_$fs
* add chapter 3 manual pages for rump, rumpuser, ukfs and p2k
* build and install userspace kernel file system daemons if MKPUFFS=yes
is spexified
* retire fsconsole for now, it will make a comeback with an actually
implemented version shortly
 1.2.2.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.2.1 05-Aug-2008  wrstuden file Makefile was added on branch wrstuden-revivesa on 2008-09-18 04:30:13 +0000
 1.13 24-Jul-2011  uch regen
 1.12 22-Nov-2010  pooka regen
 1.11 22-Nov-2010  pooka regen
 1.10 21-Nov-2010  pooka regen
 1.9 31-Mar-2010  pooka regen
 1.8 15-Feb-2009  pooka regen: putter in synopsis and note about experimental status
 1.7 10-Feb-2009  pooka regen: note that vnconfig not required
 1.6 11-Jan-2009  wiz branches: 1.6.2;
regen.
 1.5 11-Jan-2009  pooka regen: mount -o rump
 1.4 16-Oct-2008  pooka branches: 1.4.2;
regen
 1.3 05-Sep-2008  wiz branches: 1.3.2;
regen
 1.2 06-Aug-2008  pooka add comment stating that the manpage is generated
 1.1 06-Aug-2008  pooka Add manual pages for rump file system servers.
 1.3.2.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.3.2.1 05-Sep-2008  wrstuden file rump_udf.8 was added on branch wrstuden-revivesa on 2008-09-18 04:30:13 +0000
 1.4.2.1 23-Feb-2009  snj Regen for ticket 465.
 1.6.2.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.7 12-Jan-2010  pooka Make r/w servers unmount themselves cleanly upon receiving SIGINT/TERM.
 1.6 13-Dec-2009  pooka Call ukfs_part_release(). For completeness and educational value.
 1.5 03-Dec-2009  pooka Adapt ukfs users to the new ukfs_part interface.
 1.4 07-Oct-2009  pooka Support disklabels.
 1.3 04-Sep-2008  pooka branches: 1.3.2;
adjust copyright to match reality. no functional change.
 1.2 05-Aug-2008  pooka Refactor mount utilities to provide a mount_fs_parseargs() routine.
Use this routine both in mount_fs and rump_fs to provide equivalent
command line parameters and therefore usage interchangeability.
While doing this, combine some common mountgoop to mountprog.h
 1.1 29-Jul-2008  pooka Install rump libraries and utilities to the base system and remove the
private non-installed build infrastructure from sys/rump.

breakdown of commit:
* install relevant headers into /usr/include/rump
* build sys/rump/librump/rumpuser and sys/rump/librump/rumpkern
from src/lib and install as librumpuser and librump, respectively
+ this retains the ability to test a librump build with just the
kernel sources at hand
* move sys/rump/fs/lib/libukfs and sys/rump/fs/lib/libp2k to src/lib
for general consumption, they are not kernel-space dwellers anyway
* build and install sys/rump/fs/lib/lib$fs as librumpfs_$fs
* add chapter 3 manual pages for rump, rumpuser, ukfs and p2k
* build and install userspace kernel file system daemons if MKPUFFS=yes
is spexified
* retire fsconsole for now, it will make a comeback with an actually
implemented version shortly
 1.3.2.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.3.2.1 04-Sep-2008  wrstuden file rump_udf.c was added on branch wrstuden-revivesa on 2008-09-18 04:30:13 +0000
 1.2 14-Nov-2011  njoly Define RUMP_DISKFS to provide getdiskinfo from rumpdev_disk library.
 1.1 24-Jul-2011  uch branches: 1.1.2;
regen
 1.1.2.1 17-Apr-2012  yamt sync with head
 1.1 24-Jul-2011  uch v7fs rump support
 1.1 24-Jul-2011  uch v7fs rump support

RSS XML Feed