History log of /src/lib/libpuffs/puffs.3
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base
# 1.67 22-Jan-2022 pho

Allow calling puffs_mount(3) before puffs_daemon(3)

puffs_daemon(3) creates a pipe before forking, and the parent process
waits for the child to either complete puffs_mount(3) or fail. If a
user calls puffs_daemon(3) after puffs_mount(3), the function
deadlocks. While this error-reporting functionality is really a nice
thing to have, deadlocking is not great. If the filesystem has already
been mounted, puffs_mount(3) should just daemonize the process and
return.

This became an issue because fuse_daemonize(3) in FUSE API had no such
requirement and some FUSE filesystems in the wild suffered deadlocks.


# 1.66 03-Dec-2021 pho

Use size_t in place of voff_t in puffs_setrootinfo(3)

Chuck Silvers pointed out that voff_t was also supposed to be
kernel-only. The correct type to use in userland would be off_t, but
since changing vsize_t to either voff_t or off_t is an ABI change on
32-bit platforms, we use size_t knowing that it is technically
incorrect.


# 1.65 03-Dec-2021 pho

Avoid using register_t or vsize_t in <puffs.h>

<puffs.h> is a user-space header, and should not use any of
kernel-only types. It's not reasonable to require user-land
filesystems to #define _KERNTYPES.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406
# 1.64 27-Dec-2019 msaitoh

s/conjuction/conjunction/


Revision tags: netbsd-9-4-RELEASE netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base perseant-stdc-iso10646-base
# 1.63 03-Jul-2017 wiz

branches: 1.63.6;
Remove workaround for ancient HTML generation code.


Revision tags: netbsd-8-3-RELEASE netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 netbsd-8-0-RELEASE netbsd-8-0-RC2 netbsd-8-0-RC1 matt-nb8-mediatek-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.62 11-Apr-2016 christos

there is no pflags, just flags.


# 1.61 16-Feb-2015 wiz

Bump date for previous.
filesystem -> file system


# 1.60 15-Feb-2015 manu

Add PUFFS_KFLAG_NOFLUSH_META to prevent sending metadata flush to FUSE

FUSE filesystems do not expect to get metadata updates for [amc]time
and size, they updates the value on their own after operations.

The PUFFS PUFFS_KFLAG_NOFLUSH_META option prevents regular metadata cache
flushes to the filesystem , and libperfuse uses it to match Linux FUSE
behavior.

While there, fix a bug in SETATTR: do not update kernel metadata cache
from SETATTR reply when the request is asynchronous, as we do not have
the reply yet.


Revision tags: netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 tls-maxphys-base
# 1.59 18-Mar-2014 riastradh

branches: 1.59.4;
Merge riastradh-drm2 to HEAD.


Revision tags: riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1
# 1.58 20-Jul-2013 wiz

Use Mt for email addresses.


Revision tags: riastradh-drm2-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
# 1.57 16-Aug-2012 wiz

branches: 1.57.2; 1.57.4;
Bump date for previous.


# 1.56 16-Aug-2012 manu

Fix regression that has been introduced when the lookup/reclaim race
condition was addressed in libpuffs by counting lookups.

The fix assumes that cookies map to struct puffs_cookie, which has not
been documented as a requirement for filesystems using libpuffs. As an
example, we got burnt by this assumption in libp2k (kern/46734), and
we fixed bit by actually mapping libp2k cookies to struct puffs_node.

It is unlikely, but there may be third party filesystems that use cookies
unmapped to struct puffs_node, and they were left broken for now.

- we introduce a puffs_init() flag PUFFS_FLAG_PNCOOKIE that let filesystems
inform libpuffs that they map cookies to struct puffs_node. Is that flag
is used, the lookup/reclaim race condition fix is enabled. We enable the
flag for libp2k.

- filesystems that use puffs_pn_new() obviouslty use struct puffs_node
and gain PUFFS_FLAG_PNCOOKIE automatically even if they did not specify
it in puffs_init(). This include all our PUFFS filesystem in-tree except
libp2k.

- for filesystems not willing to use struct puffs_node, we introduce a
reclaim2 vnop, which is reclaim with an additionnal lookup count argument.
This vnop let the filesystem implement the lookup/reclaim race fix on
its own.


# 1.55 10-Aug-2012 wiz

Use more markup. New sentence, new line. Bump date for previous.


# 1.54 10-Aug-2012 manu

Add PUFFS_KFLAG_CACHE_DOTDOT so that vnodes hold a reference on their
parent, keeping them active, and allowing to lookup .. without sending
a request to the filesystem.

Enable the featuure for perfused, as this is how FUSE works.


Revision tags: yamt-pagecache-base5
# 1.53 18-Apr-2012 wiz

Bump date for previous.
New sentence, new line; remove trailing whitespace; fix typos;
punctuation nits.


# 1.52 18-Apr-2012 manu

- When using PUFFS_KFLAG_CACHE_FS_TTL, do not use puffs_node to carry
attribute and TTL fora newly created node. Instead extend puffs_newinfo
and add puffs_newinfo_setva() and puffs_newinfo_setttl()
- Remove node_mk_common_final in libperfuse. It used to set uid/gid for
a newly created vnode but has been made redundant along time ago since
uid and gid are properly set in FUSE header.
- In libperfuse, check for corner case where opc = 0 on INACTIVE and RECLAIM (how is it possible? Check for it to avoid a crash anyway)
- In libperfuse, make sure we unlimit RLIMIT_AS and RLIMIT_DATA so that
we do notrun out of memory because the kernel is lazy at reclaiming vnodes.
- In libperfuse, cleanup style of perfuse_destroy_pn()


Revision tags: yamt-pagecache-base4
# 1.51 08-Apr-2012 wiz

Split file system.
Comma fixes.
Remove dangling "and".
Bump date for previous.


# 1.50 08-Apr-2012 manu

Add PUFFS_KFLAG_CACHE_FS_TTL flag to puffs_init(3) to use name and
attribute cache with filesystem provided TTL.
lookup, create, mknod, mkdir, symlink, getattr and setattr messages
have been extended so that attributes and their TTL can be provided
by the filesytem. lookup, create, mknod, mkdir, and symlink messages
are also extended so that the filesystem can provide name TTL.
The filesystem updates attributes and TTL using
puffs_pn_getvap(3), puffs_pn_getvattl(3), and puffs_pn_getcnttl(3)


Revision tags: netbsd-6-base
# 1.49 26-Dec-2011 njoly

branches: 1.49.2;
Remove obsolete puffs_suspend(3) xref.


# 1.48 24-Nov-2011 manu

Documentation fix

Evgeniy Ivanov <lolkaantimat@gmail.com>


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
# 1.47 12-Jan-2010 pooka

branches: 1.47.6;
Add convenience routine puffs_unmountonsignal(), which does exactly that.


Revision tags: matt-premerge-20091211 jym-xensuspend-nbase jym-xensuspend-base
# 1.46 20-Feb-2009 pooka

Remove the paragraph saying interfaces will change without warning.
Note that a stable version of puffs first appeared in NetBSD 5.0.


# 1.45 12-Dec-2008 pooka

branches: 1.45.2;
add:
puffs_setspecific(pu, private)
Can be used to set the specific data after the call to
puffs_init().


# 1.44 14-Nov-2008 pooka

note that puffs_daemon() must be called *before* puffs_mount()


# 1.43 14-Nov-2008 pooka

fix typographical snafu


Revision tags: netbsd-5-0-RC2 netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2
# 1.42 06-Sep-2008 pooka

branches: 1.42.4;
Add AsiaBSDCon 2008 paper to SEE ALSO.


# 1.41 12-Aug-2008 pooka

Replace void * by puffs_cookie_t where appropriate. No functional change.


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 wrstuden-revivesa-base
# 1.40 25-May-2008 wiz

Remove trailing whitespace.


Revision tags: hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-pf42-base keiichi-mipv6-base matt-armv6-nbase hpcarm-cleanup-base
# 1.39 28-Jan-2008 pooka

branches: 1.39.4; 1.39.6;
Implement lazy contexts for file systems using puffs_mainloop().
Previously each request was executed on its own callcontext and
switched to every time the request was being processed. Now requests
borrow the mainloop context and switch only if/when they yield.
This takes two context switches away from a file system request
bringing down the typical amounts 2->0 (e.g. dtfs) and 4->2 (e.g.
psshfs).

The interfaces for manually executing requests changed a bit:
puffs_dispatch_create() and puffs_dispatch_exec() must now be used.
They are not tested, as nothing in-tree wants them and I doubt
anyone else is really interested in them either.

Also do some misc code cleanup related to execution contexts. The
"work-in-progress checkpoint" committed over a year ago was starting
to look slightly weed-infested.


# 1.38 14-Jan-2008 pooka

Introduce PUFFS_STACKSIZE_MIN to avoid overloading 0 and getting
a warning from the library when really wanting to say "just the
minimum, please".


Revision tags: matt-armv6-base
# 1.37 15-Dec-2007 pooka

document puffs_dopufbuf


Revision tags: cube-autoconf-base
# 1.36 04-Dec-2007 pooka

Part 3/n of extensive changes to message handling:

Get rid of the original puffs_req(3) framework and use puffs_framebuf(3)
instead for file system requests. It has the advantage of being
suitable for transporting a distributed message passing protocol
and therefore us being able to run the file system server on any
host.

Ok, puffs is not quite here yet: libpuffs needs to grow request
routing support and the message contents need to be munged into a
host independent format. Saying which format would be telling,
but it might begin with an X, end in an L and have the 13th character
in the middle. Keep an eye out for the sequels: Parts 3+m/n.


# 1.35 01-Dec-2007 wiz

Fix a typo that has migrated across files.


# 1.34 01-Dec-2007 wiz

Typo fixes.


# 1.33 16-Nov-2007 pooka

Introduce puffs_daemon(), which works like daemon(3) except that it
also synchronizes with puffs_mount() and does not return (exit) in the
parent process until the file system has been mounted. This makes
it possible to reliably run e.g. mount_foo jippi /kai ; cd /kai/ee


# 1.32 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.31 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.30 05-Oct-2007 pooka

SEE ALSO paper


# 1.29 24-Sep-2007 pooka

Add refuse paper to SEE ALSO


# 1.28 03-Sep-2007 pooka

xref refuse, don't bump date


Revision tags: matt-mips64-base
# 1.27 18-Jul-2007 pooka

branches: 1.27.4; 1.27.6;
update


# 1.26 05-Jul-2007 pooka

document PUFFS_KFLAG_LOOKUP_FULLPNBUF


# 1.25 24-Jun-2007 pooka

document KFLAG_NOCACHE{_PAGE,_NAME,}


# 1.24 17-May-2007 pooka

reflect today's mount changes


# 1.23 15-May-2007 pooka

Step 3 and currently final step of a more general purpose event loop:
support removal and addition of i/o file descriptors on the fly.

* detect closed file descriptors
* automatically free waiters of a dead file descriptor
* give the file server the possibility to specify a callback which
notifies of a dead file descriptor
* move loop function to be a property of the mainloop instead of
framebuf (doesn't change effective behaviour)
* add the possibility to configure a timespec parameter which
attempts to call the loop function periodically
* move the event loop functions from the puffs_framebuf namespace
to puffs_framev to differential between pure memory management
functions


# 1.22 09-May-2007 pooka

List all current ways to write a file system. Also, add a reference
to puffs_req(3) for the manual operation case.


# 1.21 09-May-2007 pooka

document PUFFS_KFLAG_WTCACHE and PUFFS_KFLAG_IAONDEMAND


# 1.20 01-May-2007 pooka

Introduce PUFFS_FLAG_HASHPATH, which for PUFFS_FLAG_BUILDPATH file servers
creates a hash of the node's path into po->po_hash to avoid a full pathcmp
every time.


# 1.19 16-Apr-2007 pooka

Move file system and node callbacks into their own manual page.
Improve markup and descriptions a bit (not completely finished yet).


# 1.18 16-Apr-2007 pooka

document new interfaces


# 1.17 12-Apr-2007 pooka

document accessor routines added when making struct puffs_usermount
implementation private


# 1.16 22-Mar-2007 pooka

document credentials & access control methods


# 1.15 20-Mar-2007 pooka

match puffs_node_access prototype with reality


# 1.14 13-Mar-2007 pooka

add puffs paper presented at AsiaBSDCon 2007 to "SEE ALSO"


# 1.13 08-Feb-2007 pooka

Nm the manual puffs instead of libpuffs


# 1.12 26-Jan-2007 pooka

document puffs_fs_suspend()


# 1.11 20-Jan-2007 pooka

xref puffs_req


# 1.10 20-Jan-2007 pooka

document puffs_getstate() and puffs_setstacksize()


# 1.9 20-Jan-2007 wiz

Sort SEE ALSO.


# 1.8 19-Jan-2007 pooka

Bring the documentation slightly more into sync with the current
reality. It's still really a far cry from proper documentation,
though.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base netbsd-4-base
# 1.7 01-Dec-2006 pooka

sauce catchup


# 1.6 30-Nov-2006 pooka

update with reality


# 1.5 23-Nov-2006 pooka

* document open, close and access
* nomenclature improvements


# 1.4 19-Nov-2006 wiz

Some mdoc and grammar nits.


# 1.3 13-Nov-2006 pooka

add note to BUGS about the questionable nature of puffs_node


# 1.2 13-Nov-2006 pooka

sync with change to lookup


# 1.1 09-Nov-2006 pooka

initial documentation for the puffs library interface