|
Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-8-3-RELEASE netbsd-9-4-RELEASE 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 netbsd-9-3-RELEASE cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-8-2-RELEASE netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 netbsd-8-1-RELEASE netbsd-8-1-RC1 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 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base matt-nb8-mediatek-base perseant-stdc-iso10646-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.11 |
23-Jan-2016 |
christos |
Define _KERNTYPES for things that need it.
|
|
Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6 tls-maxphys-base
|
| 1.10 |
06-Sep-2012 |
riz |
Disable default build of debugging info.
|
|
Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
|
| 1.9 |
21-Mar-2012 |
matt |
These directories default to WARNS?=5
|
|
Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
|
| 1.8 |
14-Aug-2011 |
christos |
branches: 1.8.2; simplify and eliminate non literal string formats.
|
| 1.7 |
13-Aug-2011 |
christos |
- fix warn/err confusiog - fix debugging printf - add func arguments to simple formats
|
| 1.6 |
28-Jun-2011 |
riz |
Don't hardcode the libpuffs path to /usr/src/lib/libpuffs.
|
| 1.5 |
28-Jun-2011 |
manu |
Add support for extended attributes
|
|
Revision tags: cherry-xenmp-base
|
| 1.4 |
26-May-2011 |
joerg |
Default to -Wno-sign-compare -Wno-pointer-sign for clang. Push -Wno-array-bounds down to the cases that depend on it. Selectively disable warnings for 3rd party software or non-trivial issues to be reviewed later to get clang -Werror to build most of the tree.
|
| 1.3 |
09-May-2011 |
manu |
Enable the build of perfused and libperfuse
|
| 1.2 |
03-May-2011 |
manu |
Fix build (libperfuse is still not built by default, but time is coming)
|
|
Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
|
| 1.1 |
25-Aug-2010 |
manu |
libperfuse(3) is a PUFFS relay to FUSE. In order to use it, FUSE filesystem must be patched to #include <perfuse.h> in the source files that open /dev/fuse and perform the mount(2) system call. The FUSE filesystem must be linked with -lperfuse.
libperfuse(3) implements the FUSE kernel interface, on which libfuse or any FUSE filesystem that opens /dev/fuse directly can be used.
For now, an external daemon called perfused(8) is used. This may change in the future.
|
|
Revision tags: perseant-exfatfs-base-20250801 perseant-exfatfs-base-20240630 perseant-exfatfs-base cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base phil-wifi-20200421 phil-wifi-20200411 phil-wifi-20200406 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 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 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 yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
|
| 1.1 |
03-Apr-2013 |
agc |
branches: 1.1.2; file Version.map was initially added on branch agc-symver.
|
|
Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-9-4-RELEASE 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 netbsd-9-3-RELEASE cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
|
| 1.13 |
16-Nov-2018 |
manu |
Use reclaim2 to fix reclaim/lookup race conditions
The PUFFS reclaim operation had a race condition with lookups: we could be asked to lookup a node, then to reclaim it before lookup completion. At lookup completion, we would then create a leaked node.
Enter the PUFFS reclaim2 operation, which features a nlookup argument. That let us count how many lookups are pending and avoid the above described scenario. It also makes the codes simplier.
|
|
Revision tags: pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 netbsd-7-2-RELEASE pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 netbsd-7-1-2-RELEASE pgoyette-compat-base netbsd-7-1-1-RELEASE matt-nb8-mediatek-base perseant-stdc-iso10646-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 netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 bouyer-socketcan-base pgoyette-localcount-20170107 netbsd-7-1-RC1 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6 tls-maxphys-base
|
| 1.12 |
21-Jul-2012 |
manu |
branches: 1.12.24; 1.12.30; 1.12.32; - Fix same vnodes associated with multiple cookies The scheme used to retreive known nodes on lookup was flawed, as it only used parent and name. This produced a different cookie for the same file if it was renamed, when looking up ../ or when dealing with multiple files associated with the same name through link(2).
We therefore abandon the use of node name and introduce hashed lists of inodes. This causes a huge rewrite of reclaim code, which do not attempt to keep parents allocated until all their children are reclaimed
- Fix race conditions in reclaim There are a few situations where we issue multiple FUSE operations for a PUFFS operation. On reclaim, we therefore have to wait for all FUSE operation to complete, not just the current exchanges. We do this by introducing node reference count with node_ref() and node_rele().
- Detect data loss caused by FAF VOP_PUTPAGES causes FAF writes where the kernel does not check the operation result. At least issue a warning on error.
- Enjoy FAF shortcut on setattr No need to wait for the result if the kernel does not want it. There is however an exception for setattr that touch the size, we need to wait for completion because we have other operations queued for after the resize.
- Fix fchmod() on write-open file fchmod() on a node open with write privilege will send setattr with both mode and size set. This confuses some FUSE filesystem. Therefore we send two FUSE operations, one for mode, and one for size.
- Remove node TTL handling for netbsd-5 for simplicity sake. The code still builds on netbsd-5 but does not have the node TTL feature anymore. It works fine with kernel support on netbsd-6.
|
|
Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
|
| 1.11 |
21-Mar-2012 |
matt |
Use C89 function definition
|
|
Revision tags: netbsd-6-base
|
| 1.10 |
29-Jan-2012 |
dholland |
branches: 1.10.2; Fix 32-bit build
|
| 1.9 |
29-Jan-2012 |
manu |
Improve FUSE trace facility
|
| 1.8 |
29-Dec-2011 |
riz |
Redo previous; remove all the casts I added, and use PRI* macros instead. (by popular demand - makes sense, too)
|
| 1.7 |
29-Dec-2011 |
riz |
Cast time_t to intmax_t for printf purposes, and format with %j. Fixes build on amd64 and probably i386 as well.
|
| 1.6 |
28-Dec-2011 |
manu |
Add a FUSE trace facility, with statistics collection. This should help tracking bugs and performance issues
|
|
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.5 |
03-Oct-2010 |
manu |
branches: 1.5.6; - Correctly handle rename whith overwritten destination - Keep track of file name to avoid lookups when we can. This makes sure we do not have two cookies for the same inode, a situation that cause wreak havoc when we come to remove or rename a node. - Do not use PUFFS_FLAG_BUILDPATH at all, since we now track file names - In open, queue requests after checking for access, as there is no merit to queue a will-be-denied request while we can deny it immediatly - request reclaim of removed nodes at inactive stage
|
| 1.4 |
29-Sep-2010 |
manu |
= Open files = - Restore open on our own in fsycn and readdir, as the node may not already be open, and FUSE really wants it to be. No need to close immediatly, it can be done at inactive time.
= Write operations = - fix a nasty bug that corrupted files on write (written added twice) - Keep track of file size in order to honour PUFFS_IO_APPEND
= many fixes in rename = - handler overwritten nodes correctly - wait for all operations on the node to drain before doing rename, as filesystems may not cope with operations on a moving file. - setback PUFFS_SETBACK_INACT_N1 cannot be used from rename, we therefore miss the inactive time for an overwritten node. This bounds us to give up PUFFS_KFLAG_IAONDEMAND.
= Removed files = - forbid most operations on a removed node, return ENOENT - setback PUFFS_SETBACK_NOREF_N1 at inactive stage to cause removed file reclaim
= Misc = - Update outdated ARGSUSED for lint - Fix a memory leak (puffs_pn_remove instead of puffs_pn_put) - Do not use PUFFS_FLAG_BUILDPATH except for debug output. It makes the lookup code much simplier.
|
| 1.3 |
23-Sep-2010 |
manu |
== file close operations == - use PUFFS_KFLAG_WTCACHE to puffs_init so that all writes are immediatly send to the filesystem, and we do not have anymore write after inactive. As a consequence, we can close files at inactive stage, and there is not any concern left with files opened at create time. We also do not have anymore to open ourselves in readdir and fsync.
- Fsync on close (inactive stage). That makes sure we will not need to do these operations once the file is closed (FUSE want an open file). short sircuit the request that come after the close, bu not fsinc'ing closed files,
- Use PUFFS_KFLAG_IAONDEMAND to get less inactive calls
== Removed nodes == - more ENOENT retunred for operations on removed node (but there are probably some still missing): getattr, ooen, setattr, fsync
- set PND_REMOVE before sending the UNLINK/RMDIR operations so that we avoid races during UNLINK completion. Also set PND_REMOVED on node we overwirte in rename
== Filehandle fixes == - queue open operation to avoid getting two fh for one file
- set FH in getattr, if the file is open
- Just requires a read FH for fsyncdir, as we always opendir in read mode. Ok, this is misleading :-)
== Misc == - do not set FUSE_FATTR_ATIME_NOW in setattr, as we provide the time
- short circuit nilpotent operations in setattr
- add a filename diagnostic flag to dump file names
|
| 1.2 |
15-Sep-2010 |
manu |
- Use SOCK_DGRAM instead of SOCK_STREAM, as the filesystem seems to assume datagram semantics: when using SOCK_STREAM, if perfused sends frames faster than the filesystem consumes them, it will grab multiple frames at once and discard anything beyond the first one. For now the code can work both with SOCK_DGRAM and SOCK_STREAM, but SOCK_STREAM support will probably have to be removed for the sake of readability.
- Remeber to sync parent directories when moving a node
- In debug output, display the requeue type (readdir, write, etc...)
|
| 1.1 |
25-Aug-2010 |
manu |
libperfuse(3) is a PUFFS relay to FUSE. In order to use it, FUSE filesystem must be patched to #include <perfuse.h> in the source files that open /dev/fuse and perform the mount(2) system call. The FUSE filesystem must be linked with -lperfuse.
libperfuse(3) implements the FUSE kernel interface, on which libfuse or any FUSE filesystem that opens /dev/fuse directly can be used.
For now, an external daemon called perfused(8) is used. This may change in the future.
|
|
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.8 |
17-Sep-2021 |
andvar |
some love to double letters (in comments).
|
|
Revision tags: netbsd-8-3-RELEASE netbsd-9-4-RELEASE netbsd-9-3-RELEASE cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-8-2-RELEASE netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 netbsd-8-1-RELEASE netbsd-8-1-RC1 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 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base matt-nb8-mediatek-base perseant-stdc-iso10646-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
|
| 1.7 |
18-Oct-2016 |
christos |
make this compile again, and simplify.
|
|
Revision tags: localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
|
| 1.6 |
31-Oct-2014 |
manu |
branches: 1.6.2; FUSE fallocate support There seems to be no fdiscard FUSE operation at the moment, hence that one is left unused.
|
|
Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-7-base yamt-pagecache-base9 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 tls-maxphys-base matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base
|
| 1.5 |
28-Dec-2011 |
manu |
branches: 1.5.18; Add a FUSE trace facility, with statistics collection. This should help tracking bugs and performance issues
|
|
Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
|
| 1.4 |
28-Jun-2011 |
manu |
branches: 1.4.2; Add support for extended attributes
|
|
Revision tags: cherry-xenmp-base
|
| 1.3 |
11-May-2011 |
jakllsch |
Use sysconf(_SC_PAGESIZE) instead of PAGE_SIZE.
|
|
Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
|
| 1.2 |
15-Sep-2010 |
manu |
- Use SOCK_DGRAM instead of SOCK_STREAM, as the filesystem seems to assume datagram semantics: when using SOCK_STREAM, if perfused sends frames faster than the filesystem consumes them, it will grab multiple frames at once and discard anything beyond the first one. For now the code can work both with SOCK_DGRAM and SOCK_STREAM, but SOCK_STREAM support will probably have to be removed for the sake of readability.
- Remeber to sync parent directories when moving a node
- In debug output, display the requeue type (readdir, write, etc...)
|
| 1.1 |
25-Aug-2010 |
manu |
libperfuse(3) is a PUFFS relay to FUSE. In order to use it, FUSE filesystem must be patched to #include <perfuse.h> in the source files that open /dev/fuse and perform the mount(2) system call. The FUSE filesystem must be linked with -lperfuse.
libperfuse(3) implements the FUSE kernel interface, on which libfuse or any FUSE filesystem that opens /dev/fuse directly can be used.
For now, an external daemon called perfused(8) is used. This may change in the future.
|
|
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 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 phil-wifi-20191119
|
| 1.7 |
08-Sep-2019 |
uwe |
Use the right values for .Bl -width Typeset "fuse" literal (default value for type) as a literal.
|
|
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 netbsd-9-base phil-wifi-20190609 pgoyette-compat-20190127
|
| 1.6 |
23-Jan-2019 |
uwe |
It's section 3 page, not section 2. While here, xref puffs(3) in the SEE ALSO section too.
|
|
Revision tags: netbsd-8-3-RELEASE netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base matt-nb8-mediatek-base perseant-stdc-iso10646-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
|
| 1.5 |
18-Oct-2016 |
wiz |
branches: 1.5.12; 1.5.14; Sort sections. new sentence, new line. Whitespace.
|
| 1.4 |
18-Oct-2016 |
manu |
Make FUSE socket buffer tunable
When dealing with high I/O throughput, we could run out of buffer space if the filesystem was not consuming requests fast enough. Here we slightly raise the buffer size, and we make it tunable through the PERFUSE_BUFSIZE environment variable so that we can cope with higher requirement later.
While there, document PERFUSE_OPTIONS environment variable.
|
|
Revision tags: netbsd-7-0-2-RELEASE localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-7-base yamt-pagecache-base9 yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 tls-maxphys-base matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base
|
| 1.3 |
10-May-2011 |
njoly |
branches: 1.3.22; 1.3.26; 1.3.28; Small typo in macro (Xd -> Xr).
|
|
Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
|
| 1.2 |
01-Sep-2010 |
wiz |
Some fixes. Comment out ERRORS section until it has content.
|
| 1.1 |
25-Aug-2010 |
manu |
libperfuse(3) is a PUFFS relay to FUSE. In order to use it, FUSE filesystem must be patched to #include <perfuse.h> in the source files that open /dev/fuse and perform the mount(2) system call. The FUSE filesystem must be linked with -lperfuse.
libperfuse(3) implements the FUSE kernel interface, on which libfuse or any FUSE filesystem that opens /dev/fuse directly can be used.
For now, an external daemon called perfused(8) is used. This may change in the future.
|
|
Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base perseant-exfatfs-base-20240630 perseant-exfatfs-base
|
| 1.92 |
24-Jun-2023 |
msaitoh |
Fix typo in comment.
|
|
Revision tags: netbsd-10-1-RELEASE 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.91 |
06-Jul-2022 |
andvar |
fix various typos in comments.
|
| 1.90 |
12-Apr-2022 |
andvar |
s/sould/should/ and s/shoud/should/
|
| 1.89 |
11-Sep-2021 |
andvar |
sysinst/partitions.h: fix typos comments, also fix same typos in other files.
|
|
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 phil-wifi-20191119
|
| 1.88 |
23-Sep-2019 |
christos |
Restore binary compatibility by using the statvfs90 structure internally.
|
| 1.87 |
10-Aug-2019 |
manu |
Rollback directory filehandle screening for FUSE lock operations
libfuse has a different usage of filehandles for files and directories. A directory filehandle is valid only for directory operations such as OPENDIR, READDIR, RELEASEDIR, FSYNCDIR. Change of src/lib/libperfuse/ops.c 1.85-1.86 made sure filehandles of directories were only sent for that operations.
However, the status of lock operations GETLK, SETLK, SETLKW was overlooked. The only FUSE filesystem I found using locks is GlusterFS, and it needs directory filehandles to be provided on lock operations, otherwise locking crashes the filesystem. Hence this change brings back filehandles for lock operations on directories.
|
|
Revision tags: netbsd-9-base phil-wifi-20190609
|
| 1.86 |
09-Feb-2019 |
manu |
branches: 1.86.2; Fix directory filehandle usage with libufse. Fix lookup count
libfuse does not use filehandle the same way for directories and other objects. As a result, filehandles obtained by OPENDIR should not be sent on non-directory related operations like READ/WRITE/GETATTR...
While there, fix the lookup count sent to the FORGET operation, which led to leaked nodes.
|
|
Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
|
| 1.85 |
16-Nov-2018 |
manu |
Use reclaim2 to fix reclaim/lookup race conditions
The PUFFS reclaim operation had a race condition with lookups: we could be asked to lookup a node, then to reclaim it before lookup completion. At lookup completion, we would then create a leaked node.
Enter the PUFFS reclaim2 operation, which features a nlookup argument. That let us count how many lookups are pending and avoid the above described scenario. It also makes the codes simplier.
|
|
Revision tags: pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base matt-nb8-mediatek-base perseant-stdc-iso10646-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.84 |
03-Jun-2015 |
manu |
branches: 1.84.8; 1.84.14; 1.84.16; Fix dot-lookup when readdir does not provide inodes
Some filesystems do not provide inode numbers through readdir (FUSE mounts without -o use_ino). We therefore have to lookup each directory entry to get the missing numbers.
dot and double-dot are exceptions, as we already know the values. Moreover, the lookup code does not expect to get requests for dot and will abort perfused(8) when it gets some. In order to fix that, we just check for dot and double-dot special case and use the known values instead of sending a lookup.
|
| 1.83 |
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.
|
| 1.82 |
13-Jan-2015 |
manu |
Fix atime update
FUSE filesystems assume that SETATTR with atime is the result of utiimes() being called. As a result, atime and mtime will be updated. This happens with MooseFS and glusterFS. atime is supposed to be updated by the filesystem itself when it gets read operations.
We fix the problem in SETATTR operations by 1) do not create a mtime update when we have an atime update (and vice versa), just fill the fields to avoid the filesystem restting the missing field to Epoch, but do not pretend we want to update it. 2) If the change is limited to atime, iscard it, as updates should be done by READ operations 3) Kernel part of PUFFS has been fixed to make sure reads on empty file are sent to the filesystem: http://mail-index.netbsd.org/source-changes/2015/01/13/msg062364.html
Thanks to Tom Ivar Helbekkmo for reporting this issue.
|
| 1.81 |
12-Nov-2014 |
manu |
Allow setxattr to be called with a NULL value, instead of crashing.
|
| 1.80 |
04-Nov-2014 |
manu |
Restore build with -DDEBUG, and avoid a spurious diagnostic error with -DDEBUG
|
| 1.79 |
31-Oct-2014 |
manu |
Avoid deadlocks on write errors
On write errors, we failed to dequeue some operations, leading to rare but unpleasant deadlocks
|
| 1.78 |
31-Oct-2014 |
manu |
FUSE fallocate support There seems to be no fdiscard FUSE operation at the moment, hence that one is left unused.
|
| 1.77 |
28-Oct-2014 |
manu |
Fix invalid free in deletextattr FUSE handler
Do not free FUSE message on error as it was not allocated.
|
| 1.76 |
11-Oct-2014 |
manu |
Report allocated bytes on FS correctly, instead of using file size (which is wrong for sparse files)
|
| 1.75 |
30-Sep-2014 |
manu |
Do not trust the filesystem's readdir to give us nul-terminated file names
|
| 1.74 |
11-Sep-2014 |
manu |
Avoid a file resize serialization deadlock when writing with PUFFS_IO_APPEND flag. The symptom was a hang when appending to a file with a null size.
|
| 1.73 |
05-Sep-2014 |
manu |
rmdir dir/.. must return an error. Use ENOTEMPRY like FFS does.
|
| 1.72 |
03-Sep-2014 |
enami |
Fix build failure on amd64.
|
| 1.71 |
03-Sep-2014 |
manu |
Improve POSIX compliance of FUSE filesystems through PERUSE - access denied is EPERM and not EACCES - access to file owned by someone else in a sticy-bit directory should be allowed for the sticy-bit directory owner - setting sticky-bit on a non directory should produce EFTYPE - implement PATHCONF method as much as we can.
|
| 1.70 |
29-Aug-2014 |
manu |
We used to remove the trailing zeros in FUSE readlink replies, but it seems it does not always happen. Just remove them if present.
|
| 1.69 |
19-Aug-2014 |
manu |
Remove usless warning that happens often with direct IO
|
| 1.68 |
16-Aug-2014 |
manu |
Removed unimplemented mmap and seek method. seek's declaration caused seek request to be passed backand forth between kernel and userland while we did nothing about them.
|
| 1.67 |
16-Aug-2014 |
manu |
Use just introduced open2 PUFFS method and its PUFFS_OPEN_IO_DIRECT oflag to implement FUSE's OPEN_IO_DIRECT, by which the filesystem tells the kernel that read/write to the file should bypass the page cache.
Remove a warning about read beyond EOF which will now normally appear when page cache is bypassed.
|
|
Revision tags: netbsd-7-base tls-maxphys-base
|
| 1.66 |
10-Aug-2014 |
manu |
branches: 1.66.2; - Make sure non root users cannot access system namespace attributes - honour namespace specification when listing attributes - Also fix message memory leak introduced by previous commit
|
| 1.65 |
09-Aug-2014 |
manu |
getextattr: fix attribute length being reported to caller. If buffer is too small, return ENORANGE.
Caught by glusterFS regression tests
|
|
Revision tags: tls-earlyentropy-base
|
| 1.64 |
09-Aug-2014 |
manu |
Send GETATTR to filesystem for removed but still-open files, as it is the expected behavior (bug caught by glusterFS regression tests)
|
|
Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3
|
| 1.63 |
06-Jan-2014 |
manu |
branches: 1.63.2; For filesystems mounted without -o use_ino, readdir is not able to fetch inode number. We perfom an addtional lookup on each file to get it.
In that case, do not lookup .. from root, as it breaks out of the filesystem and hits NULL pointers.
|
|
Revision tags: riastradh-drm2-base2 riastradh-drm2-base1
|
| 1.62 |
19-Jul-2013 |
manu |
Catch open without FREAD|FWRITE (it should not happen)
|
| 1.61 |
18-Jul-2013 |
manu |
One more explicit error log, and two bug fixes 1) with recent FUSE, when lookup returns a null ino, it means ENOENT 2) odd corner case that caused a bug on dd if=test of=test conv=notrunc This caused the file to be open first ro, then rw. A logic bug in perfuse_node_open caused it to skip the second operation, whereas it should open for writing, and store the write FH without touching the read FH.
|
|
Revision tags: riastradh-drm2-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7
|
| 1.60 |
03-Nov-2012 |
manu |
branches: 1.60.2; When lookup returns a node with null inode number, it means the ENOENT, with negative caching. We do not implement negative caching yet, but we honour the ENOENT.
|
|
Revision tags: yamt-pagecache-base6
|
| 1.59 |
21-Jul-2012 |
manu |
branches: 1.59.2; - Fix same vnodes associated with multiple cookies The scheme used to retreive known nodes on lookup was flawed, as it only used parent and name. This produced a different cookie for the same file if it was renamed, when looking up ../ or when dealing with multiple files associated with the same name through link(2).
We therefore abandon the use of node name and introduce hashed lists of inodes. This causes a huge rewrite of reclaim code, which do not attempt to keep parents allocated until all their children are reclaimed
- Fix race conditions in reclaim There are a few situations where we issue multiple FUSE operations for a PUFFS operation. On reclaim, we therefore have to wait for all FUSE operation to complete, not just the current exchanges. We do this by introducing node reference count with node_ref() and node_rele().
- Detect data loss caused by FAF VOP_PUTPAGES causes FAF writes where the kernel does not check the operation result. At least issue a warning on error.
- Enjoy FAF shortcut on setattr No need to wait for the result if the kernel does not want it. There is however an exception for setattr that touch the size, we need to wait for completion because we have other operations queued for after the resize.
- Fix fchmod() on write-open file fchmod() on a node open with write privilege will send setattr with both mode and size set. This confuses some FUSE filesystem. Therefore we send two FUSE operations, one for mode, and one for size.
- Remove node TTL handling for netbsd-5 for simplicity sake. The code still builds on netbsd-5 but does not have the node TTL feature anymore. It works fine with kernel support on netbsd-6.
|
| 1.58 |
28-Jun-2012 |
abs |
Fix the build by adding (unused) flags argument to perfuse_node_setattr_ttl
|
| 1.57 |
14-Jun-2012 |
manu |
Fix memory leak when we discard a voided setattr operation
|
| 1.56 |
13-Jun-2012 |
manu |
Fix memory leak on setattr
|
| 1.55 |
28-May-2012 |
manu |
Setting mode by fchmod(2) will break on glusterfs-3.3 is we attempt to set atime and mtime at the same time. Detect that situation just like we detected ftruncate(2) and wipe atime and mtime if it occurs.
|
|
Revision tags: yamt-pagecache-base5
|
| 1.54 |
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.53 |
08-Apr-2012 |
manu |
Use new PUFFS_KFLAG_CACHE_FS_TTL option to puffs_init(3) so that FUSE TTL on name and attributes are used. This save many PUFFS operations and improves performances.
PUFFS_KFLAG_CACHE_FS_TTL is #ifdef'ed in many places for now so that libperfuse can still be used on netbsd-5.
|
| 1.52 |
21-Mar-2012 |
matt |
Use C89 function definition
|
| 1.51 |
08-Mar-2012 |
manu |
The kernel can lookup the same node multiple time and will reclaim as many times it looked up. All reclaims but the last one must be ignored, otherwise we discard a node which will still get operations. We therefore have to keep track of lookup/reclaim count and hnour reclaims only when the count reaches zero.
|
|
Revision tags: netbsd-6-base
|
| 1.50 |
29-Jan-2012 |
manu |
branches: 1.50.2; Improve FUSE trace facility
|
| 1.49 |
28-Dec-2011 |
manu |
Add a FUSE trace facility, with statistics collection. This should help tracking bugs and performance issues
|
| 1.48 |
16-Dec-2011 |
manu |
Rework puffs_framebuf management toremove leaks and abusive reuses. On exchange error, the puffs_framebuf is now freed immediatly, before requeuing outstanding requests.
|
| 1.47 |
28-Nov-2011 |
manu |
- Add missing ENOENT or ESTALL when accessing deleted node - Fix a warning, fix style (80 chars for a line)
|
| 1.46 |
17-Nov-2011 |
manu |
Copy node expiration date before comparing it, otherwise the comparison does not work (no idea why) and cached node is never used.
|
| 1.45 |
16-Nov-2011 |
manu |
Correctly pass the advlock owner id from kernel to filesystem, instead of using process PID.
Allow the usage of the read filehandle for advlock, in order to support shared locks on read-only files
|
| 1.44 |
10-Nov-2011 |
manu |
Return EISDIR for read/write to directories. NetBSD directory read should instead return a getent(2) output, but is that really used?
|
|
Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
|
| 1.43 |
30-Oct-2011 |
manu |
branches: 1.43.2; - Fix the confusion between fileno (opaque FUSE reference) and inode numbers. fileno must be used when exchanging FUSE messages. - Do not use kernel name cache anymore, as it caused modification from other machines to be invisible. - Honour name and attribute cache directive from FUSE filesystem
|
| 1.42 |
10-Sep-2011 |
tron |
Avoid comparison between signed and unsigned integer expressions by casting the offset to a unsigned type. This fixes the NetBSD/i386 and hopefully the NetBSD/amd64 build.
|
| 1.41 |
09-Sep-2011 |
christos |
make this build on amd64 and remove redundant and unused code.
|
| 1.40 |
09-Sep-2011 |
manu |
Serialize access to file size. We already have such a thing in the kernel, where it fixes race for PUFFS filesystems, but we need it again in perfused since FUSE filesystems are allowed to reorder requests.
The huge issue is in the asyncrhonous SETATTR sent by fsync. It is followed by a syncrhnous FSYNC, so if the filesystem does not reorder requests, once the FSYNC returns, we are confident the SETATTR is done. But since FUSE can reorder, we need to implement sync in perfused.
|
| 1.39 |
13-Aug-2011 |
christos |
- fix warn/err confusiog - fix debugging printf - add func arguments to simple formats
|
| 1.38 |
09-Aug-2011 |
manu |
Fix uninitiaized variable usage (never though lint would miss that when used by return statement) that caused unprivilegied user to fail on unlink(2) and rename(2) operations.
|
| 1.37 |
02-Aug-2011 |
manu |
Do not reject reads on directory, it raises a useless EBADFD while the thing can just fail silently.
|
| 1.36 |
02-Aug-2011 |
manu |
Fix creds passed to FUSE when requests are done on behalf of the kernel. We previously sent uid/gid set to -1, we now set it to 0.
|
| 1.35 |
19-Jul-2011 |
manu |
Make sure libperfuse still builds on netbsd-5.1
|
| 1.34 |
18-Jul-2011 |
manu |
ftruncate(2) cause a SETATTR with only va_size set, and some filesystems (e.g.: glusterfs) will do a custom handling in such a situation. This breaks because libpuffs folds a metadata (va_atime and va_mtime) update in each SETATTR. We try to identify SETATTR caused by ftruncate(2) and remove va_atime and va_mtime in such situation.
This fixes a bug with glusterfs, where parts of a file downloaded by FTP was filled with zeros because of a ftruncate(2) sent out of order with write(2) requests. glusterfs behavior depends on the undocumented FUSE rule that ftruncate(2) will only set va_size in SETATTR.
|
| 1.33 |
14-Jul-2011 |
manu |
FUSE struct dirent's off is not the offset in the buffer, it is an opaque cookie that the filesystem passes us, and that we need to send back on the next READDIR. Most filesystem just ignore the value and send the next chunk of buffer, but not all of them. Fixing this allows glusterfs distributed volume to work.
|
| 1.32 |
04-Jul-2011 |
manu |
Add a flag to VOP_LISTEXTATTR(9) so that the vnode interface can tell the filesystem in which format extended attribute shall be listed.
There are currently two formats: - NUL-terminated strings, used for listxattr(2), this is the default. - one byte length-pprefixed, non NUL-terminated strings, used for extattr_list_file(2), which is obtanined by setting the EXTATTR_LIST_PREFIXLEN flag to VOP_LISTEXTATTR(9)
This approach avoid the need for converting the list back and forth, except in libperfuse, since FUSE uses NUL-terminated strings, and the kernel may have requested EXTATTR_LIST_PREFIXLEN.
|
| 1.31 |
28-Jun-2011 |
manu |
Add support for extended attributes
|
| 1.30 |
01-Jun-2011 |
manu |
Fix race conditions between write and getattr/setattr, which lead to inconsitencies between kernel and filesystem idea of file size during writes with IO_APPEND.
At mine, this resulted in a configure script producing config.status with ": clr\n" lines stripped (not 100% reproductible, but always this specific string. That is of little interest except for my own future reference).
When a write is in progress, getattr/setattr get/set the maximum size among kernel idea (grown by write) and filesystem idea (not yet grown).
|
|
Revision tags: cherry-xenmp-base
|
| 1.29 |
01-Jun-2011 |
manu |
branches: 1.29.2; Remove outdated comment about a fixed bug
|
| 1.28 |
30-May-2011 |
manu |
Use SOCK_SEQPACKET in perfuse if available. This fix file operations hangs where the FUSE filesyste replied to an operation and got an ENOBUFS it did not handle.
We now are also able to cleanly unmount
|
| 1.27 |
18-May-2011 |
manu |
- Proper permission checks when doing directory traversal. e.g.: run rm dir/file while dir was never looked up since the mount. In that situation, we get lookup with pcn_nameiop NAMEI_DELETE for dir before we get it for file. But for dir we are just looking for PUFFS_VEXEC. This is solved by honouring NAMEI_ISLASTCN, which is set for the last element only
- do not send O_EXCL to FUSE as documentation forbids it.
- fix warning
|
| 1.26 |
11-May-2011 |
jakllsch |
Use sysconf(_SC_PAGESIZE) instead of PAGE_SIZE.
|
| 1.25 |
03-May-2011 |
manu |
Fixes for the advlock method. It can now sustain pkgsrc/devel/locktests with glusterfs as backend
|
| 1.24 |
25-Apr-2011 |
manu |
- Implement proper unprivilegied user permission verifications Verification is now done in the lookup method, as it is the way to go. Of course there are corner cases, such as the sticky bit which need special handling in the remove method.
- Set full fsidx in vftstat method
- Do not pass O_APPEND to the filesystem. FUSE always sends the write offset, so setting O_APPEND is useless. If the filesystem uses it in an open(2) system call, it will even cause file corruptions, since offsets given to pwrite(2) will be ignored. This fix allows glusterfs to host a NetBSD ./build.sh -o build
- Do not use the FUSE access method, use getattr and check for permission on our own. The problem is that a FUSE filesystem will typically use the Linux-specific setfsuid() to perform access control. If that is missing, any chack is likely to occur on behalf of the user running the filesystem (typically root), causing access method to return wrong information.
- When possible, avoid performing a getattr method call and use cached value in puffs_node instead. We still retreive the latest value by calling getattr when performing append write operation, to minimize the chances that another writer appended since the last time we did.
- Update puffs_node cached file size in write method
- Remove unused argument to perfuse_destroy_pn()
|
|
Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
|
| 1.23 |
11-Oct-2010 |
manu |
Remove code supporting SOCK_STREAM, as SOCK_DGRAM works fine
|
| 1.22 |
11-Oct-2010 |
manu |
FUSE filesystems' readlink returns a resolved link with a NUL trailing character, and PUFFS do not want it. This fixes this bug, that returned stat the informations for x instead of reporting ENOENT: mkdir x && ln x z && stat -x z/whatever/you/want
|
| 1.21 |
11-Oct-2010 |
manu |
- fix access control: pcn->pcn_cred is not user credentials - Keep track of file generation - remove size tracking in pnd_size, we have it in pn_va.va_size
|
| 1.20 |
04-Oct-2010 |
manu |
- delete an obsoelte comment about inactive - remove a test for getattr return field that was never filled - correctly send filehandle and filehandle flags for getaattr
|
| 1.19 |
03-Oct-2010 |
manu |
- Correctly handle rename whith overwritten destination - Keep track of file name to avoid lookups when we can. This makes sure we do not have two cookies for the same inode, a situation that cause wreak havoc when we come to remove or rename a node. - Do not use PUFFS_FLAG_BUILDPATH at all, since we now track file names - In open, queue requests after checking for access, as there is no merit to queue a will-be-denied request while we can deny it immediatly - request reclaim of removed nodes at inactive stage
|
| 1.18 |
29-Sep-2010 |
manu |
= Open files = - Restore open on our own in fsycn and readdir, as the node may not already be open, and FUSE really wants it to be. No need to close immediatly, it can be done at inactive time.
= Write operations = - fix a nasty bug that corrupted files on write (written added twice) - Keep track of file size in order to honour PUFFS_IO_APPEND
= many fixes in rename = - handler overwritten nodes correctly - wait for all operations on the node to drain before doing rename, as filesystems may not cope with operations on a moving file. - setback PUFFS_SETBACK_INACT_N1 cannot be used from rename, we therefore miss the inactive time for an overwritten node. This bounds us to give up PUFFS_KFLAG_IAONDEMAND.
= Removed files = - forbid most operations on a removed node, return ENOENT - setback PUFFS_SETBACK_NOREF_N1 at inactive stage to cause removed file reclaim
= Misc = - Update outdated ARGSUSED for lint - Fix a memory leak (puffs_pn_remove instead of puffs_pn_put) - Do not use PUFFS_FLAG_BUILDPATH except for debug output. It makes the lookup code much simplier.
|
| 1.17 |
23-Sep-2010 |
manu |
== file close operations == - use PUFFS_KFLAG_WTCACHE to puffs_init so that all writes are immediatly send to the filesystem, and we do not have anymore write after inactive. As a consequence, we can close files at inactive stage, and there is not any concern left with files opened at create time. We also do not have anymore to open ourselves in readdir and fsync.
- Fsync on close (inactive stage). That makes sure we will not need to do these operations once the file is closed (FUSE want an open file). short sircuit the request that come after the close, bu not fsinc'ing closed files,
- Use PUFFS_KFLAG_IAONDEMAND to get less inactive calls
== Removed nodes == - more ENOENT retunred for operations on removed node (but there are probably some still missing): getattr, ooen, setattr, fsync
- set PND_REMOVE before sending the UNLINK/RMDIR operations so that we avoid races during UNLINK completion. Also set PND_REMOVED on node we overwirte in rename
== Filehandle fixes == - queue open operation to avoid getting two fh for one file
- set FH in getattr, if the file is open
- Just requires a read FH for fsyncdir, as we always opendir in read mode. Ok, this is misleading :-)
== Misc == - do not set FUSE_FATTR_ATIME_NOW in setattr, as we provide the time
- short circuit nilpotent operations in setattr
- add a filename diagnostic flag to dump file names
|
| 1.16 |
20-Sep-2010 |
manu |
- performance improvement for read, readdir and write. Now we use SOCK_DGRAM, we can send many pages at once without hitting any bug
- when creating a file, it is open for FUSE, but not for the kernel. If the kernel does not do a subsequent open, we have a leak. We fight against this by trying to close such file that the kernel left unopen for some time.
- some code refactoring to make message exchange debug easier (more to come)
|
| 1.15 |
15-Sep-2010 |
manu |
- Use SOCK_DGRAM instead of SOCK_STREAM, as the filesystem seems to assume datagram semantics: when using SOCK_STREAM, if perfused sends frames faster than the filesystem consumes them, it will grab multiple frames at once and discard anything beyond the first one. For now the code can work both with SOCK_DGRAM and SOCK_STREAM, but SOCK_STREAM support will probably have to be removed for the sake of readability.
- Remeber to sync parent directories when moving a node
- In debug output, display the requeue type (readdir, write, etc...)
|
| 1.14 |
09-Sep-2010 |
manu |
- call FSYNCDIR for directories - directories can be open R/W (for FSYNCDIR) - do not skip calls to FSYNC or FSYNCDIR if the filesystem returned ENOSYS: it may change its mind, and it may also actually do something when retunring ENOSYS - When FSYNC and FSYNCDIR return ENOSYS, do not report it to kernel (silent failure)
|
| 1.13 |
07-Sep-2010 |
manu |
Mode argument must contain the file type (S_* items) for create and mknod
|
| 1.12 |
07-Sep-2010 |
manu |
- Do not checkfor peer credentials when perfused is autostarted and therefore runs with filesystem privileges
- shut up warnings and debug messages when perfused is autostarted
- make perfused patch modifiable with CFLAGS for easier pkgsrc integration
- Fix build warnings
|
| 1.11 |
06-Sep-2010 |
manu |
More LP64 fixes
|
| 1.10 |
06-Sep-2010 |
manu |
build fixes for LP64
|
| 1.9 |
05-Sep-2010 |
manu |
- correctly set flags for CREATE
- after a node is deleted, some operations should return ENOENT, some should be ignored. Fixed it for ACCESS, SETATTR and GETATTR. Other operation may also need a fix.
- At reclaim time, there is no need to wait for READDIR and READ completion, since the caller will never close a file before getting readir() and read() replies. Waiting for WRITE completion is still mandatory, but we must ensure that no queued WRITE is awaiting to be scheduled. Once the queue is drained, we must check that the reclaim operation was not canceled by a new file LOOKUP.
- At reclaim time, fixed a mix up between read and write fh to close
- Fixed permission checks for RENAME (it tested the node itself instead of the source)
- When seting file mode, only MKNOD needs the filetype (S_* fields). It is probably a bug to set it for other operations.
|
| 1.8 |
03-Sep-2010 |
manu |
Fix reference count bug introduced by previous commit
|
| 1.7 |
03-Sep-2010 |
manu |
- Postpone file close at reclaim time, since NetBSD sends fsync and setattr(mtime, ctime) after close, while FUSE expects the file to be open for these operations
- remove unused argument to node_mk_common()
- remove requeued requests when they are executed, not when they are tagged for schedule
- try to make filehandle management simplier, by keeping track of only one read and one write filehandle (the latter being really read/write).
- when CREATE is not available, we use the MKNOD/OPEN path. Fix a bug here where we opened the parent directory instead of the node: add the missing lookup of the mknod'ed node.
- lookup file we just created: glusterfs does not really see them otherwise.
- open file when doing setattr(mtime, ctime) on non open files, as some filesystems seems to require it.
- Do not flush pagecache for removed nodes
- Keep track of read/write operations in progress, and at reclaim time, make sure they are over before closing and forgeting the file.
|
| 1.6 |
02-Sep-2010 |
manu |
- only remove queued requests once they are executed, not when they are set to be scheduled later - remove an unused argument to make lint happy
|
| 1.5 |
01-Sep-2010 |
manu |
Build fixes for LP64
|
| 1.4 |
28-Aug-2010 |
manu |
- set user/group ownership after object creation.
- enforce permissios checks. This needs to be reviewed.
|
| 1.3 |
27-Aug-2010 |
manu |
- if perfused is not already started (cannot connect to /dev/fuse), FUSE filesystems will attempt to start it on their own, and will communicate using a socketpair
- do not advertise NULL file handle as being valid when sending themback to the FUSE filesystem.
- unmount if we cannot talk to the FUSE process anymore
- set calling process gid properly
- debug message cleanup
|
| 1.2 |
26-Aug-2010 |
manu |
- open the file before doing fsync: glusterfs wants that.
- Automatically call fsync on close for files. If we just close, fsync will come later and we will have to reopen
- Add a PND_DIRTY flag to keep track of files that really need a sync. perfuse_node_fsync only calls the FUSE fsync method if there are data to push.
- Add a PND_OPEN flag to keep track of open files. Checking non NULL fh is not enough, as some filesystems will always set fh to 0.
- Add a sync diagnostic flag, to watch fsync and dirty flag activity. Make the fh diagnostic flag more verbose
- Send the fh in setattr (it was hardcoded to 0)
I am now able to build libperfuse in a glusterfs mounted filesystem. Yeah!
|
| 1.1 |
25-Aug-2010 |
manu |
libperfuse(3) is a PUFFS relay to FUSE. In order to use it, FUSE filesystem must be patched to #include <perfuse.h> in the source files that open /dev/fuse and perform the mount(2) system call. The FUSE filesystem must be linked with -lperfuse.
libperfuse(3) implements the FUSE kernel interface, on which libfuse or any FUSE filesystem that opens /dev/fuse directly can be used.
For now, an external daemon called perfused(8) is used. This may change in the future.
|
|
Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base perseant-exfatfs-base-20240630 perseant-exfatfs-base
|
| 1.45 |
30-Mar-2024 |
andvar |
s/Unfortunatley/Unfortunately/ in comment.
|
|
Revision tags: netbsd-10-1-RELEASE 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.44 |
23-Feb-2022 |
andvar |
fix various typos in comments, mainly immediatly/immediately/, as well shared and recently fixed typos in OpenBSD code by Jonathan Grey.
|
| 1.43 |
08-Aug-2021 |
nia |
introduce a SOL_LOCAL for unix-domain socket level socket options as an alias of the current 0 used for these options, as in FreeBSD.
reviewed by many.
|
|
Revision tags: netbsd-9-4-RELEASE netbsd-9-3-RELEASE cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609
|
| 1.42 |
17-Apr-2019 |
maya |
fix typo
|
|
Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
|
| 1.41 |
16-Nov-2018 |
manu |
Use reclaim2 to fix reclaim/lookup race conditions
The PUFFS reclaim operation had a race condition with lookups: we could be asked to lookup a node, then to reclaim it before lookup completion. At lookup completion, we would then create a leaked node.
Enter the PUFFS reclaim2 operation, which features a nlookup argument. That let us count how many lookups are pending and avoid the above described scenario. It also makes the codes simplier.
|
|
Revision tags: pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base matt-nb8-mediatek-base perseant-stdc-iso10646-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
|
| 1.40 |
19-Oct-2016 |
christos |
branches: 1.40.6; 1.40.12; 1.40.14; make the env stuff visible.
|
| 1.39 |
18-Oct-2016 |
christos |
make this compile again, and simplify.
|
| 1.38 |
18-Oct-2016 |
manu |
Make FUSE socket buffer tunable
When dealing with high I/O throughput, we could run out of buffer space if the filesystem was not consuming requests fast enough. Here we slightly raise the buffer size, and we make it tunable through the PERFUSE_BUFSIZE environment variable so that we can cope with higher requirement later.
While there, document PERFUSE_OPTIONS environment variable.
|
|
Revision tags: localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
|
| 1.37 |
19-Jun-2015 |
christos |
branches: 1.37.2; Deal with limits properly. Don't print strerror() 2ice. XXX: pullup-7
|
| 1.36 |
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.
|
| 1.35 |
31-Oct-2014 |
manu |
FUSE fallocate support There seems to be no fdiscard FUSE operation at the moment, hence that one is left unused.
|
| 1.34 |
03-Sep-2014 |
manu |
Improve POSIX compliance of FUSE filesystems through PERUSE - access denied is EPERM and not EACCES - access to file owned by someone else in a sticy-bit directory should be allowed for the sticy-bit directory owner - setting sticky-bit on a non directory should produce EFTYPE - implement PATHCONF method as much as we can.
|
| 1.33 |
16-Aug-2014 |
manu |
Removed unimplemented mmap and seek method. seek's declaration caused seek request to be passed backand forth between kernel and userland while we did nothing about them.
|
| 1.32 |
16-Aug-2014 |
manu |
Use just introduced open2 PUFFS method and its PUFFS_OPEN_IO_DIRECT oflag to implement FUSE's OPEN_IO_DIRECT, by which the filesystem tells the kernel that read/write to the file should bypass the page cache.
Remove a warning about read beyond EOF which will now normally appear when page cache is bypassed.
|
|
Revision tags: netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6 tls-maxphys-base
|
| 1.31 |
10-Sep-2012 |
manu |
branches: 1.31.10; Turn a fatal error into a warning.
|
| 1.30 |
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.
|
| 1.29 |
21-Jul-2012 |
manu |
- Fix same vnodes associated with multiple cookies The scheme used to retreive known nodes on lookup was flawed, as it only used parent and name. This produced a different cookie for the same file if it was renamed, when looking up ../ or when dealing with multiple files associated with the same name through link(2).
We therefore abandon the use of node name and introduce hashed lists of inodes. This causes a huge rewrite of reclaim code, which do not attempt to keep parents allocated until all their children are reclaimed
- Fix race conditions in reclaim There are a few situations where we issue multiple FUSE operations for a PUFFS operation. On reclaim, we therefore have to wait for all FUSE operation to complete, not just the current exchanges. We do this by introducing node reference count with node_ref() and node_rele().
- Detect data loss caused by FAF VOP_PUTPAGES causes FAF writes where the kernel does not check the operation result. At least issue a warning on error.
- Enjoy FAF shortcut on setattr No need to wait for the result if the kernel does not want it. There is however an exception for setattr that touch the size, we need to wait for completion because we have other operations queued for after the resize.
- Fix fchmod() on write-open file fchmod() on a node open with write privilege will send setattr with both mode and size set. This confuses some FUSE filesystem. Therefore we send two FUSE operations, one for mode, and one for size.
- Remove node TTL handling for netbsd-5 for simplicity sake. The code still builds on netbsd-5 but does not have the node TTL feature anymore. It works fine with kernel support on netbsd-6.
|
|
Revision tags: yamt-pagecache-base5
|
| 1.28 |
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.27 |
08-Apr-2012 |
manu |
Use new PUFFS_KFLAG_CACHE_FS_TTL option to puffs_init(3) so that FUSE TTL on name and attributes are used. This save many PUFFS operations and improves performances.
PUFFS_KFLAG_CACHE_FS_TTL is #ifdef'ed in many places for now so that libperfuse can still be used on netbsd-5.
|
| 1.26 |
21-Mar-2012 |
matt |
Use C89 function definition
|
|
Revision tags: netbsd-6-base
|
| 1.25 |
03-Feb-2012 |
manu |
branches: 1.25.2; Make sure perfused exit when the filesystem crashed, so that unmount is done. Failure to do so caused deadlocks, with operation that held a lock on the root vnode and got stuck in perfused forever.
Approved by releng.
|
| 1.24 |
28-Dec-2011 |
manu |
Add a FUSE trace facility, with statistics collection. This should help tracking bugs and performance issues
|
|
Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
|
| 1.23 |
30-Oct-2011 |
manu |
branches: 1.23.2; - Fix the confusion between fileno (opaque FUSE reference) and inode numbers. fileno must be used when exchanging FUSE messages. - Do not use kernel name cache anymore, as it caused modification from other machines to be invisible. - Honour name and attribute cache directive from FUSE filesystem
|
| 1.22 |
23-Oct-2011 |
manu |
perfuse memory usage can grow quite large when using a lot of vnodes, and the amount of data memory involved is not easy to forcast. We therefore raise the limit to the maximum.
Patch from Manuel Bouyer. It helps completing a cvs update on a glusterfs colume.
|
| 1.21 |
18-Oct-2011 |
manu |
mlockall is not necessary after all, once we have fixed a kernel bug involving agedaemon sleeping form memory
|
| 1.20 |
09-Sep-2011 |
christos |
make this build on amd64 and remove redundant and unused code.
|
| 1.19 |
09-Sep-2011 |
manu |
Make sure perfused remains locked in memory, otherwise we can get deadlocks in low memory situations, where ioflush waits for perfused to fsync vnodes, and perfused waits for memory to be freed.
|
| 1.18 |
13-Aug-2011 |
christos |
- fix warn/err confusiog - fix debugging printf - add func arguments to simple formats
|
| 1.17 |
09-Aug-2011 |
manu |
Remove PUFFS_KFLAG_WTCACHE, which caused data corruption and slowdown
|
| 1.16 |
28-Jun-2011 |
manu |
Add support for extended attributes
|
|
Revision tags: cherry-xenmp-base
|
| 1.15 |
30-May-2011 |
manu |
Use SOCK_SEQPACKET in perfuse if available. This fix file operations hangs where the FUSE filesyste replied to an operation and got an ENOBUFS it did not handle.
We now are also able to cleanly unmount
|
| 1.14 |
18-May-2011 |
manu |
Set buffer size as big in nomal mode as we do in debug mode, when perfused stays in foreground. The difference is a mistake and was not intended.
There is still a bug ready to bite here, since SOCK_STREAM is not reliable. We just hope that buffers are big enough to hold all packets, but if they are overflown, we loose a packet and a file operation gets stuck.
We really nee SOCk_SEQPACKET here, but unfortunately it is very broken at that time.
|
| 1.13 |
12-May-2011 |
manu |
Mont FUSE filesystem with proprer source and fstype so that df and mount display something that makes sense
|
| 1.12 |
25-Apr-2011 |
manu |
- Implement proper unprivilegied user permission verifications Verification is now done in the lookup method, as it is the way to go. Of course there are corner cases, such as the sticky bit which need special handling in the remove method.
- Set full fsidx in vftstat method
- Do not pass O_APPEND to the filesystem. FUSE always sends the write offset, so setting O_APPEND is useless. If the filesystem uses it in an open(2) system call, it will even cause file corruptions, since offsets given to pwrite(2) will be ignored. This fix allows glusterfs to host a NetBSD ./build.sh -o build
- Do not use the FUSE access method, use getattr and check for permission on our own. The problem is that a FUSE filesystem will typically use the Linux-specific setfsuid() to perform access control. If that is missing, any chack is likely to occur on behalf of the user running the filesystem (typically root), causing access method to return wrong information.
- When possible, avoid performing a getattr method call and use cached value in puffs_node instead. We still retreive the latest value by calling getattr when performing append write operation, to minimize the chances that another writer appended since the last time we did.
- Update puffs_node cached file size in write method
- Remove unused argument to perfuse_destroy_pn()
|
|
Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
|
| 1.11 |
11-Oct-2010 |
manu |
Remove code supporting SOCK_STREAM, as SOCK_DGRAM works fine
|
| 1.10 |
03-Oct-2010 |
manu |
- Correctly handle rename whith overwritten destination - Keep track of file name to avoid lookups when we can. This makes sure we do not have two cookies for the same inode, a situation that cause wreak havoc when we come to remove or rename a node. - Do not use PUFFS_FLAG_BUILDPATH at all, since we now track file names - In open, queue requests after checking for access, as there is no merit to queue a will-be-denied request while we can deny it immediatly - request reclaim of removed nodes at inactive stage
|
| 1.9 |
29-Sep-2010 |
manu |
= Open files = - Restore open on our own in fsycn and readdir, as the node may not already be open, and FUSE really wants it to be. No need to close immediatly, it can be done at inactive time.
= Write operations = - fix a nasty bug that corrupted files on write (written added twice) - Keep track of file size in order to honour PUFFS_IO_APPEND
= many fixes in rename = - handler overwritten nodes correctly - wait for all operations on the node to drain before doing rename, as filesystems may not cope with operations on a moving file. - setback PUFFS_SETBACK_INACT_N1 cannot be used from rename, we therefore miss the inactive time for an overwritten node. This bounds us to give up PUFFS_KFLAG_IAONDEMAND.
= Removed files = - forbid most operations on a removed node, return ENOENT - setback PUFFS_SETBACK_NOREF_N1 at inactive stage to cause removed file reclaim
= Misc = - Update outdated ARGSUSED for lint - Fix a memory leak (puffs_pn_remove instead of puffs_pn_put) - Do not use PUFFS_FLAG_BUILDPATH except for debug output. It makes the lookup code much simplier.
|
| 1.8 |
23-Sep-2010 |
manu |
== file close operations == - use PUFFS_KFLAG_WTCACHE to puffs_init so that all writes are immediatly send to the filesystem, and we do not have anymore write after inactive. As a consequence, we can close files at inactive stage, and there is not any concern left with files opened at create time. We also do not have anymore to open ourselves in readdir and fsync.
- Fsync on close (inactive stage). That makes sure we will not need to do these operations once the file is closed (FUSE want an open file). short sircuit the request that come after the close, bu not fsinc'ing closed files,
- Use PUFFS_KFLAG_IAONDEMAND to get less inactive calls
== Removed nodes == - more ENOENT retunred for operations on removed node (but there are probably some still missing): getattr, ooen, setattr, fsync
- set PND_REMOVE before sending the UNLINK/RMDIR operations so that we avoid races during UNLINK completion. Also set PND_REMOVED on node we overwirte in rename
== Filehandle fixes == - queue open operation to avoid getting two fh for one file
- set FH in getattr, if the file is open
- Just requires a read FH for fsyncdir, as we always opendir in read mode. Ok, this is misleading :-)
== Misc == - do not set FUSE_FATTR_ATIME_NOW in setattr, as we provide the time
- short circuit nilpotent operations in setattr
- add a filename diagnostic flag to dump file names
|
| 1.7 |
20-Sep-2010 |
manu |
- performance improvement for read, readdir and write. Now we use SOCK_DGRAM, we can send many pages at once without hitting any bug
- when creating a file, it is open for FUSE, but not for the kernel. If the kernel does not do a subsequent open, we have a leak. We fight against this by trying to close such file that the kernel left unopen for some time.
- some code refactoring to make message exchange debug easier (more to come)
|
| 1.6 |
15-Sep-2010 |
manu |
- Use SOCK_DGRAM instead of SOCK_STREAM, as the filesystem seems to assume datagram semantics: when using SOCK_STREAM, if perfused sends frames faster than the filesystem consumes them, it will grab multiple frames at once and discard anything beyond the first one. For now the code can work both with SOCK_DGRAM and SOCK_STREAM, but SOCK_STREAM support will probably have to be removed for the sake of readability.
- Remeber to sync parent directories when moving a node
- In debug output, display the requeue type (readdir, write, etc...)
|
| 1.5 |
07-Sep-2010 |
manu |
- Do not checkfor peer credentials when perfused is autostarted and therefore runs with filesystem privileges
- shut up warnings and debug messages when perfused is autostarted
- make perfused patch modifiable with CFLAGS for easier pkgsrc integration
- Fix build warnings
|
| 1.4 |
06-Sep-2010 |
manu |
More LP64 fixes
|
| 1.3 |
28-Aug-2010 |
manu |
- set user/group ownership after object creation.
- enforce permissios checks. This needs to be reviewed.
|
| 1.2 |
27-Aug-2010 |
manu |
- if perfused is not already started (cannot connect to /dev/fuse), FUSE filesystems will attempt to start it on their own, and will communicate using a socketpair
- do not advertise NULL file handle as being valid when sending themback to the FUSE filesystem.
- unmount if we cannot talk to the FUSE process anymore
- set calling process gid properly
- debug message cleanup
|
| 1.1 |
25-Aug-2010 |
manu |
libperfuse(3) is a PUFFS relay to FUSE. In order to use it, FUSE filesystem must be patched to #include <perfuse.h> in the source files that open /dev/fuse and perform the mount(2) system call. The FUSE filesystem must be linked with -lperfuse.
libperfuse(3) implements the FUSE kernel interface, on which libfuse or any FUSE filesystem that opens /dev/fuse directly can be used.
For now, an external daemon called perfused(8) is used. This may change in the future.
|
|
Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base
|
| 1.1 |
21-Nov-2024 |
riastradh |
branches: 1.1.4; libperfuse: Add expected symbols list.
NOTE: This exports iftovt_tab and vttoif_tab. Is that intentional? Not declared anywhere!
PR lib/58838: shared libraries in base should all have expsym lists
|
|
Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-8-3-RELEASE netbsd-9-4-RELEASE 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 netbsd-9-3-RELEASE cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-8-2-RELEASE netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 netbsd-8-1-RELEASE netbsd-8-1-RC1 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 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base matt-nb8-mediatek-base perseant-stdc-iso10646-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.2 |
22-Jan-2016 |
dholland |
Needs sys/cdefs.h for __BEGIN_DECLS and sys/types.h for mode_t.
|
|
Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-7-base yamt-pagecache-base9 yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 tls-maxphys-base matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
|
| 1.1 |
25-Aug-2010 |
manu |
libperfuse(3) is a PUFFS relay to FUSE. In order to use it, FUSE filesystem must be patched to #include <perfuse.h> in the source files that open /dev/fuse and perform the mount(2) system call. The FUSE filesystem must be linked with -lperfuse.
libperfuse(3) implements the FUSE kernel interface, on which libfuse or any FUSE filesystem that opens /dev/fuse directly can be used.
For now, an external daemon called perfused(8) is used. This may change in the future.
|
|
Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base perseant-exfatfs-base-20240630 perseant-exfatfs-base
|
| 1.25 |
13-May-2023 |
andvar |
fix typos in comments.
|
|
Revision tags: netbsd-10-1-RELEASE 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.24 |
12-Dec-2021 |
andvar |
fix typos in word "request(s)".
|
|
Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base phil-wifi-20200421 phil-wifi-20200411 phil-wifi-20200406
|
| 1.23 |
05-Mar-2020 |
msaitoh |
miscelaneous -> miscellaneous in comment.
|
|
Revision tags: netbsd-8-3-RELEASE netbsd-9-4-RELEASE netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE is-mlppp-base netbsd-8-2-RELEASE netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 netbsd-8-1-RELEASE netbsd-8-1-RC1 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 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base matt-nb8-mediatek-base perseant-stdc-iso10646-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
|
| 1.22 |
19-Oct-2016 |
christos |
branches: 1.22.14; make the env stuff visible.
|
| 1.21 |
18-Oct-2016 |
christos |
make this compile again, and simplify.
|
|
Revision tags: netbsd-7-0-2-RELEASE localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6 tls-maxphys-base
|
| 1.20 |
21-Jul-2012 |
manu |
branches: 1.20.10; 1.20.14; 1.20.16; - Fix same vnodes associated with multiple cookies The scheme used to retreive known nodes on lookup was flawed, as it only used parent and name. This produced a different cookie for the same file if it was renamed, when looking up ../ or when dealing with multiple files associated with the same name through link(2).
We therefore abandon the use of node name and introduce hashed lists of inodes. This causes a huge rewrite of reclaim code, which do not attempt to keep parents allocated until all their children are reclaimed
- Fix race conditions in reclaim There are a few situations where we issue multiple FUSE operations for a PUFFS operation. On reclaim, we therefore have to wait for all FUSE operation to complete, not just the current exchanges. We do this by introducing node reference count with node_ref() and node_rele().
- Detect data loss caused by FAF VOP_PUTPAGES causes FAF writes where the kernel does not check the operation result. At least issue a warning on error.
- Enjoy FAF shortcut on setattr No need to wait for the result if the kernel does not want it. There is however an exception for setattr that touch the size, we need to wait for completion because we have other operations queued for after the resize.
- Fix fchmod() on write-open file fchmod() on a node open with write privilege will send setattr with both mode and size set. This confuses some FUSE filesystem. Therefore we send two FUSE operations, one for mode, and one for size.
- Remove node TTL handling for netbsd-5 for simplicity sake. The code still builds on netbsd-5 but does not have the node TTL feature anymore. It works fine with kernel support on netbsd-6.
|
| 1.19 |
05-Jun-2012 |
manu |
Add placeholder so that we can later add allbacks without breaking the ABI
|
|
Revision tags: yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base
|
| 1.18 |
28-Dec-2011 |
manu |
branches: 1.18.2; Add a FUSE trace facility, with statistics collection. This should help tracking bugs and performance issues
|
|
Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
|
| 1.17 |
30-Oct-2011 |
manu |
branches: 1.17.2; - Fix the confusion between fileno (opaque FUSE reference) and inode numbers. fileno must be used when exchanging FUSE messages. - Do not use kernel name cache anymore, as it caused modification from other machines to be invisible. - Honour name and attribute cache directive from FUSE filesystem
|
| 1.16 |
09-Sep-2011 |
manu |
Serialize access to file size. We already have such a thing in the kernel, where it fixes race for PUFFS filesystems, but we need it again in perfused since FUSE filesystems are allowed to reorder requests.
The huge issue is in the asyncrhonous SETATTR sent by fsync. It is followed by a syncrhnous FSYNC, so if the filesystem does not reorder requests, once the FSYNC returns, we are confident the SETATTR is done. But since FUSE can reorder, we need to implement sync in perfused.
|
| 1.15 |
14-Aug-2011 |
christos |
simplify and eliminate non literal string formats.
|
| 1.14 |
13-Aug-2011 |
christos |
- fix warn/err confusiog - fix debugging printf - add func arguments to simple formats
|
|
Revision tags: cherry-xenmp-base
|
| 1.13 |
30-May-2011 |
manu |
Use SOCK_SEQPACKET in perfuse if available. This fix file operations hangs where the FUSE filesyste replied to an operation and got an ENOBUFS it did not handle.
We now are also able to cleanly unmount
|
| 1.12 |
18-May-2011 |
manu |
typos
|
| 1.11 |
11-May-2011 |
jakllsch |
Use sysconf(_SC_PAGESIZE) instead of PAGE_SIZE.
|
|
Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
|
| 1.10 |
11-Oct-2010 |
manu |
Remove code supporting SOCK_STREAM, as SOCK_DGRAM works fine
|
| 1.9 |
23-Sep-2010 |
manu |
== file close operations == - use PUFFS_KFLAG_WTCACHE to puffs_init so that all writes are immediatly send to the filesystem, and we do not have anymore write after inactive. As a consequence, we can close files at inactive stage, and there is not any concern left with files opened at create time. We also do not have anymore to open ourselves in readdir and fsync.
- Fsync on close (inactive stage). That makes sure we will not need to do these operations once the file is closed (FUSE want an open file). short sircuit the request that come after the close, bu not fsinc'ing closed files,
- Use PUFFS_KFLAG_IAONDEMAND to get less inactive calls
== Removed nodes == - more ENOENT retunred for operations on removed node (but there are probably some still missing): getattr, ooen, setattr, fsync
- set PND_REMOVE before sending the UNLINK/RMDIR operations so that we avoid races during UNLINK completion. Also set PND_REMOVED on node we overwirte in rename
== Filehandle fixes == - queue open operation to avoid getting two fh for one file
- set FH in getattr, if the file is open
- Just requires a read FH for fsyncdir, as we always opendir in read mode. Ok, this is misleading :-)
== Misc == - do not set FUSE_FATTR_ATIME_NOW in setattr, as we provide the time
- short circuit nilpotent operations in setattr
- add a filename diagnostic flag to dump file names
|
| 1.8 |
15-Sep-2010 |
manu |
- Use SOCK_DGRAM instead of SOCK_STREAM, as the filesystem seems to assume datagram semantics: when using SOCK_STREAM, if perfused sends frames faster than the filesystem consumes them, it will grab multiple frames at once and discard anything beyond the first one. For now the code can work both with SOCK_DGRAM and SOCK_STREAM, but SOCK_STREAM support will probably have to be removed for the sake of readability.
- Remeber to sync parent directories when moving a node
- In debug output, display the requeue type (readdir, write, etc...)
|
| 1.7 |
07-Sep-2010 |
manu |
- Do not checkfor peer credentials when perfused is autostarted and therefore runs with filesystem privileges
- shut up warnings and debug messages when perfused is autostarted
- make perfused patch modifiable with CFLAGS for easier pkgsrc integration
- Fix build warnings
|
| 1.6 |
06-Sep-2010 |
manu |
More LP64 fixes
|
| 1.5 |
06-Sep-2010 |
manu |
build fixes for LP64
|
| 1.4 |
01-Sep-2010 |
manu |
Build fixes for LP64
|
| 1.3 |
27-Aug-2010 |
manu |
- if perfused is not already started (cannot connect to /dev/fuse), FUSE filesystems will attempt to start it on their own, and will communicate using a socketpair
- do not advertise NULL file handle as being valid when sending themback to the FUSE filesystem.
- unmount if we cannot talk to the FUSE process anymore
- set calling process gid properly
- debug message cleanup
|
| 1.2 |
26-Aug-2010 |
manu |
- open the file before doing fsync: glusterfs wants that.
- Automatically call fsync on close for files. If we just close, fsync will come later and we will have to reopen
- Add a PND_DIRTY flag to keep track of files that really need a sync. perfuse_node_fsync only calls the FUSE fsync method if there are data to push.
- Add a PND_OPEN flag to keep track of open files. Checking non NULL fh is not enough, as some filesystems will always set fh to 0.
- Add a sync diagnostic flag, to watch fsync and dirty flag activity. Make the fh diagnostic flag more verbose
- Send the fh in setattr (it was hardcoded to 0)
I am now able to build libperfuse in a glusterfs mounted filesystem. Yeah!
|
| 1.1 |
25-Aug-2010 |
manu |
libperfuse(3) is a PUFFS relay to FUSE. In order to use it, FUSE filesystem must be patched to #include <perfuse.h> in the source files that open /dev/fuse and perform the mount(2) system call. The FUSE filesystem must be linked with -lperfuse.
libperfuse(3) implements the FUSE kernel interface, on which libfuse or any FUSE filesystem that opens /dev/fuse directly can be used.
For now, an external daemon called perfused(8) is used. This may change in the future.
|
|
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 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 phil-wifi-20191119
|
| 1.38 |
23-Sep-2019 |
christos |
Restore binary compatibility by using the statvfs90 structure internally.
|
|
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 netbsd-9-base phil-wifi-20190609 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
|
| 1.37 |
16-Nov-2018 |
manu |
Use reclaim2 to fix reclaim/lookup race conditions
The PUFFS reclaim operation had a race condition with lookups: we could be asked to lookup a node, then to reclaim it before lookup completion. At lookup completion, we would then create a leaked node.
Enter the PUFFS reclaim2 operation, which features a nlookup argument. That let us count how many lookups are pending and avoid the above described scenario. It also makes the codes simplier.
|
|
Revision tags: pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base matt-nb8-mediatek-base perseant-stdc-iso10646-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.36 |
31-Oct-2014 |
manu |
branches: 1.36.8; 1.36.14; 1.36.16; FUSE fallocate support There seems to be no fdiscard FUSE operation at the moment, hence that one is left unused.
|
| 1.35 |
03-Sep-2014 |
enami |
Fix build failure on amd64.
|
| 1.34 |
16-Aug-2014 |
manu |
Removed unimplemented mmap and seek method. seek's declaration caused seek request to be passed backand forth between kernel and userland while we did nothing about them.
|
| 1.33 |
16-Aug-2014 |
manu |
Use just introduced open2 PUFFS method and its PUFFS_OPEN_IO_DIRECT oflag to implement FUSE's OPEN_IO_DIRECT, by which the filesystem tells the kernel that read/write to the file should bypass the page cache.
Remove a warning about read beyond EOF which will now normally appear when page cache is bypassed.
|
|
Revision tags: netbsd-7-base tls-maxphys-base
|
| 1.32 |
10-Aug-2014 |
manu |
branches: 1.32.2; - Make sure non root users cannot access system namespace attributes - honour namespace specification when listing attributes - Also fix message memory leak introduced by previous commit
|
|
Revision tags: yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
|
| 1.31 |
21-Jul-2012 |
manu |
branches: 1.31.2; - Fix same vnodes associated with multiple cookies The scheme used to retreive known nodes on lookup was flawed, as it only used parent and name. This produced a different cookie for the same file if it was renamed, when looking up ../ or when dealing with multiple files associated with the same name through link(2).
We therefore abandon the use of node name and introduce hashed lists of inodes. This causes a huge rewrite of reclaim code, which do not attempt to keep parents allocated until all their children are reclaimed
- Fix race conditions in reclaim There are a few situations where we issue multiple FUSE operations for a PUFFS operation. On reclaim, we therefore have to wait for all FUSE operation to complete, not just the current exchanges. We do this by introducing node reference count with node_ref() and node_rele().
- Detect data loss caused by FAF VOP_PUTPAGES causes FAF writes where the kernel does not check the operation result. At least issue a warning on error.
- Enjoy FAF shortcut on setattr No need to wait for the result if the kernel does not want it. There is however an exception for setattr that touch the size, we need to wait for completion because we have other operations queued for after the resize.
- Fix fchmod() on write-open file fchmod() on a node open with write privilege will send setattr with both mode and size set. This confuses some FUSE filesystem. Therefore we send two FUSE operations, one for mode, and one for size.
- Remove node TTL handling for netbsd-5 for simplicity sake. The code still builds on netbsd-5 but does not have the node TTL feature anymore. It works fine with kernel support on netbsd-6.
|
| 1.30 |
28-Jun-2012 |
abs |
Fix the build by adding (unused) flags argument to perfuse_node_setattr_ttl
|
|
Revision tags: yamt-pagecache-base5
|
| 1.29 |
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.28 |
08-Apr-2012 |
manu |
Use new PUFFS_KFLAG_CACHE_FS_TTL option to puffs_init(3) so that FUSE TTL on name and attributes are used. This save many PUFFS operations and improves performances.
PUFFS_KFLAG_CACHE_FS_TTL is #ifdef'ed in many places for now so that libperfuse can still be used on netbsd-5.
|
| 1.27 |
21-Mar-2012 |
matt |
Use C89 function definition
|
| 1.26 |
08-Mar-2012 |
manu |
The kernel can lookup the same node multiple time and will reclaim as many times it looked up. All reclaims but the last one must be ignored, otherwise we discard a node which will still get operations. We therefore have to keep track of lookup/reclaim count and hnour reclaims only when the count reaches zero.
|
|
Revision tags: netbsd-6-base
|
| 1.25 |
29-Jan-2012 |
manu |
branches: 1.25.2; Improve FUSE trace facility
|
| 1.24 |
28-Dec-2011 |
manu |
Add a FUSE trace facility, with statistics collection. This should help tracking bugs and performance issues
|
|
Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
|
| 1.23 |
30-Oct-2011 |
manu |
branches: 1.23.2; - Fix the confusion between fileno (opaque FUSE reference) and inode numbers. fileno must be used when exchanging FUSE messages. - Do not use kernel name cache anymore, as it caused modification from other machines to be invisible. - Honour name and attribute cache directive from FUSE filesystem
|
| 1.22 |
09-Sep-2011 |
manu |
Serialize access to file size. We already have such a thing in the kernel, where it fixes race for PUFFS filesystems, but we need it again in perfused since FUSE filesystems are allowed to reorder requests.
The huge issue is in the asyncrhonous SETATTR sent by fsync. It is followed by a syncrhnous FSYNC, so if the filesystem does not reorder requests, once the FSYNC returns, we are confident the SETATTR is done. But since FUSE can reorder, we need to implement sync in perfused.
|
| 1.21 |
14-Jul-2011 |
manu |
FUSE struct dirent's off is not the offset in the buffer, it is an opaque cookie that the filesystem passes us, and that we need to send back on the next READDIR. Most filesystem just ignore the value and send the next chunk of buffer, but not all of them. Fixing this allows glusterfs distributed volume to work.
|
| 1.20 |
04-Jul-2011 |
manu |
Add a flag to VOP_LISTEXTATTR(9) so that the vnode interface can tell the filesystem in which format extended attribute shall be listed.
There are currently two formats: - NUL-terminated strings, used for listxattr(2), this is the default. - one byte length-pprefixed, non NUL-terminated strings, used for extattr_list_file(2), which is obtanined by setting the EXTATTR_LIST_PREFIXLEN flag to VOP_LISTEXTATTR(9)
This approach avoid the need for converting the list back and forth, except in libperfuse, since FUSE uses NUL-terminated strings, and the kernel may have requested EXTATTR_LIST_PREFIXLEN.
|
| 1.19 |
28-Jun-2011 |
manu |
Add support for extended attributes
|
|
Revision tags: cherry-xenmp-base
|
| 1.18 |
30-May-2011 |
manu |
Use SOCK_SEQPACKET in perfuse if available. This fix file operations hangs where the FUSE filesyste replied to an operation and got an ENOBUFS it did not handle.
We now are also able to cleanly unmount
|
| 1.17 |
25-Apr-2011 |
manu |
- Implement proper unprivilegied user permission verifications Verification is now done in the lookup method, as it is the way to go. Of course there are corner cases, such as the sticky bit which need special handling in the remove method.
- Set full fsidx in vftstat method
- Do not pass O_APPEND to the filesystem. FUSE always sends the write offset, so setting O_APPEND is useless. If the filesystem uses it in an open(2) system call, it will even cause file corruptions, since offsets given to pwrite(2) will be ignored. This fix allows glusterfs to host a NetBSD ./build.sh -o build
- Do not use the FUSE access method, use getattr and check for permission on our own. The problem is that a FUSE filesystem will typically use the Linux-specific setfsuid() to perform access control. If that is missing, any chack is likely to occur on behalf of the user running the filesystem (typically root), causing access method to return wrong information.
- When possible, avoid performing a getattr method call and use cached value in puffs_node instead. We still retreive the latest value by calling getattr when performing append write operation, to minimize the chances that another writer appended since the last time we did.
- Update puffs_node cached file size in write method
- Remove unused argument to perfuse_destroy_pn()
|
|
Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
|
| 1.16 |
11-Oct-2010 |
manu |
Remove code supporting SOCK_STREAM, as SOCK_DGRAM works fine
|
| 1.15 |
11-Oct-2010 |
manu |
- fix access control: pcn->pcn_cred is not user credentials - Keep track of file generation - remove size tracking in pnd_size, we have it in pn_va.va_size
|
| 1.14 |
03-Oct-2010 |
manu |
- Correctly handle rename whith overwritten destination - Keep track of file name to avoid lookups when we can. This makes sure we do not have two cookies for the same inode, a situation that cause wreak havoc when we come to remove or rename a node. - Do not use PUFFS_FLAG_BUILDPATH at all, since we now track file names - In open, queue requests after checking for access, as there is no merit to queue a will-be-denied request while we can deny it immediatly - request reclaim of removed nodes at inactive stage
|
| 1.13 |
29-Sep-2010 |
manu |
= Open files = - Restore open on our own in fsycn and readdir, as the node may not already be open, and FUSE really wants it to be. No need to close immediatly, it can be done at inactive time.
= Write operations = - fix a nasty bug that corrupted files on write (written added twice) - Keep track of file size in order to honour PUFFS_IO_APPEND
= many fixes in rename = - handler overwritten nodes correctly - wait for all operations on the node to drain before doing rename, as filesystems may not cope with operations on a moving file. - setback PUFFS_SETBACK_INACT_N1 cannot be used from rename, we therefore miss the inactive time for an overwritten node. This bounds us to give up PUFFS_KFLAG_IAONDEMAND.
= Removed files = - forbid most operations on a removed node, return ENOENT - setback PUFFS_SETBACK_NOREF_N1 at inactive stage to cause removed file reclaim
= Misc = - Update outdated ARGSUSED for lint - Fix a memory leak (puffs_pn_remove instead of puffs_pn_put) - Do not use PUFFS_FLAG_BUILDPATH except for debug output. It makes the lookup code much simplier.
|
| 1.12 |
23-Sep-2010 |
manu |
== file close operations == - use PUFFS_KFLAG_WTCACHE to puffs_init so that all writes are immediatly send to the filesystem, and we do not have anymore write after inactive. As a consequence, we can close files at inactive stage, and there is not any concern left with files opened at create time. We also do not have anymore to open ourselves in readdir and fsync.
- Fsync on close (inactive stage). That makes sure we will not need to do these operations once the file is closed (FUSE want an open file). short sircuit the request that come after the close, bu not fsinc'ing closed files,
- Use PUFFS_KFLAG_IAONDEMAND to get less inactive calls
== Removed nodes == - more ENOENT retunred for operations on removed node (but there are probably some still missing): getattr, ooen, setattr, fsync
- set PND_REMOVE before sending the UNLINK/RMDIR operations so that we avoid races during UNLINK completion. Also set PND_REMOVED on node we overwirte in rename
== Filehandle fixes == - queue open operation to avoid getting two fh for one file
- set FH in getattr, if the file is open
- Just requires a read FH for fsyncdir, as we always opendir in read mode. Ok, this is misleading :-)
== Misc == - do not set FUSE_FATTR_ATIME_NOW in setattr, as we provide the time
- short circuit nilpotent operations in setattr
- add a filename diagnostic flag to dump file names
|
| 1.11 |
20-Sep-2010 |
manu |
- performance improvement for read, readdir and write. Now we use SOCK_DGRAM, we can send many pages at once without hitting any bug
- when creating a file, it is open for FUSE, but not for the kernel. If the kernel does not do a subsequent open, we have a leak. We fight against this by trying to close such file that the kernel left unopen for some time.
- some code refactoring to make message exchange debug easier (more to come)
|
| 1.10 |
15-Sep-2010 |
manu |
- Use SOCK_DGRAM instead of SOCK_STREAM, as the filesystem seems to assume datagram semantics: when using SOCK_STREAM, if perfused sends frames faster than the filesystem consumes them, it will grab multiple frames at once and discard anything beyond the first one. For now the code can work both with SOCK_DGRAM and SOCK_STREAM, but SOCK_STREAM support will probably have to be removed for the sake of readability.
- Remeber to sync parent directories when moving a node
- In debug output, display the requeue type (readdir, write, etc...)
|
| 1.9 |
09-Sep-2010 |
manu |
- call FSYNCDIR for directories - directories can be open R/W (for FSYNCDIR) - do not skip calls to FSYNC or FSYNCDIR if the filesystem returned ENOSYS: it may change its mind, and it may also actually do something when retunring ENOSYS - When FSYNC and FSYNCDIR return ENOSYS, do not report it to kernel (silent failure)
|
| 1.8 |
06-Sep-2010 |
manu |
More LP64 fixes
|
| 1.7 |
06-Sep-2010 |
manu |
build fixes for LP64
|
| 1.6 |
05-Sep-2010 |
manu |
- correctly set flags for CREATE
- after a node is deleted, some operations should return ENOENT, some should be ignored. Fixed it for ACCESS, SETATTR and GETATTR. Other operation may also need a fix.
- At reclaim time, there is no need to wait for READDIR and READ completion, since the caller will never close a file before getting readir() and read() replies. Waiting for WRITE completion is still mandatory, but we must ensure that no queued WRITE is awaiting to be scheduled. Once the queue is drained, we must check that the reclaim operation was not canceled by a new file LOOKUP.
- At reclaim time, fixed a mix up between read and write fh to close
- Fixed permission checks for RENAME (it tested the node itself instead of the source)
- When seting file mode, only MKNOD needs the filetype (S_* fields). It is probably a bug to set it for other operations.
|
| 1.5 |
03-Sep-2010 |
manu |
- Postpone file close at reclaim time, since NetBSD sends fsync and setattr(mtime, ctime) after close, while FUSE expects the file to be open for these operations
- remove unused argument to node_mk_common()
- remove requeued requests when they are executed, not when they are tagged for schedule
- try to make filehandle management simplier, by keeping track of only one read and one write filehandle (the latter being really read/write).
- when CREATE is not available, we use the MKNOD/OPEN path. Fix a bug here where we opened the parent directory instead of the node: add the missing lookup of the mknod'ed node.
- lookup file we just created: glusterfs does not really see them otherwise.
- open file when doing setattr(mtime, ctime) on non open files, as some filesystems seems to require it.
- Do not flush pagecache for removed nodes
- Keep track of read/write operations in progress, and at reclaim time, make sure they are over before closing and forgeting the file.
|
| 1.4 |
01-Sep-2010 |
manu |
Build fixes for LP64
|
| 1.3 |
27-Aug-2010 |
manu |
- if perfused is not already started (cannot connect to /dev/fuse), FUSE filesystems will attempt to start it on their own, and will communicate using a socketpair
- do not advertise NULL file handle as being valid when sending themback to the FUSE filesystem.
- unmount if we cannot talk to the FUSE process anymore
- set calling process gid properly
- debug message cleanup
|
| 1.2 |
26-Aug-2010 |
manu |
- open the file before doing fsync: glusterfs wants that.
- Automatically call fsync on close for files. If we just close, fsync will come later and we will have to reopen
- Add a PND_DIRTY flag to keep track of files that really need a sync. perfuse_node_fsync only calls the FUSE fsync method if there are data to push.
- Add a PND_OPEN flag to keep track of open files. Checking non NULL fh is not enough, as some filesystems will always set fh to 0.
- Add a sync diagnostic flag, to watch fsync and dirty flag activity. Make the fh diagnostic flag more verbose
- Send the fh in setattr (it was hardcoded to 0)
I am now able to build libperfuse in a glusterfs mounted filesystem. Yeah!
|
| 1.1 |
25-Aug-2010 |
manu |
libperfuse(3) is a PUFFS relay to FUSE. In order to use it, FUSE filesystem must be patched to #include <perfuse.h> in the source files that open /dev/fuse and perform the mount(2) system call. The FUSE filesystem must be linked with -lperfuse.
libperfuse(3) implements the FUSE kernel interface, on which libfuse or any FUSE filesystem that opens /dev/fuse directly can be used.
For now, an external daemon called perfused(8) is used. This may change in the future.
|
|
Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-8-3-RELEASE netbsd-9-4-RELEASE 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 netbsd-9-3-RELEASE cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-8-2-RELEASE netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 netbsd-8-1-RELEASE netbsd-8-1-RC1 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 netbsd-7-2-RELEASE pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 netbsd-7-1-2-RELEASE pgoyette-compat-base netbsd-7-1-1-RELEASE matt-nb8-mediatek-base perseant-stdc-iso10646-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 netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 bouyer-socketcan-base pgoyette-localcount-20170107 netbsd-7-1-RC1 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-7-base yamt-pagecache-base9 yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 tls-maxphys-base matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
|
| 1.1 |
25-Aug-2010 |
manu |
libperfuse(3) is a PUFFS relay to FUSE. In order to use it, FUSE filesystem must be patched to #include <perfuse.h> in the source files that open /dev/fuse and perform the mount(2) system call. The FUSE filesystem must be linked with -lperfuse.
libperfuse(3) implements the FUSE kernel interface, on which libfuse or any FUSE filesystem that opens /dev/fuse directly can be used.
For now, an external daemon called perfused(8) is used. This may change in the future.
|
|
Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-8-3-RELEASE netbsd-9-4-RELEASE 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 netbsd-9-3-RELEASE cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-8-2-RELEASE netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 netbsd-8-1-RELEASE netbsd-8-1-RC1 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 netbsd-7-2-RELEASE pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 netbsd-7-1-2-RELEASE pgoyette-compat-base netbsd-7-1-1-RELEASE matt-nb8-mediatek-base perseant-stdc-iso10646-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 netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 bouyer-socketcan-base pgoyette-localcount-20170107 netbsd-7-1-RC1 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base tls-maxphys-base
|
| 1.20 |
10-Aug-2014 |
manu |
- Make sure non root users cannot access system namespace attributes - honour namespace specification when listing attributes - Also fix message memory leak introduced by previous commit
|
|
Revision tags: yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
|
| 1.19 |
21-Jul-2012 |
manu |
branches: 1.19.2; - Fix same vnodes associated with multiple cookies The scheme used to retreive known nodes on lookup was flawed, as it only used parent and name. This produced a different cookie for the same file if it was renamed, when looking up ../ or when dealing with multiple files associated with the same name through link(2).
We therefore abandon the use of node name and introduce hashed lists of inodes. This causes a huge rewrite of reclaim code, which do not attempt to keep parents allocated until all their children are reclaimed
- Fix race conditions in reclaim There are a few situations where we issue multiple FUSE operations for a PUFFS operation. On reclaim, we therefore have to wait for all FUSE operation to complete, not just the current exchanges. We do this by introducing node reference count with node_ref() and node_rele().
- Detect data loss caused by FAF VOP_PUTPAGES causes FAF writes where the kernel does not check the operation result. At least issue a warning on error.
- Enjoy FAF shortcut on setattr No need to wait for the result if the kernel does not want it. There is however an exception for setattr that touch the size, we need to wait for completion because we have other operations queued for after the resize.
- Fix fchmod() on write-open file fchmod() on a node open with write privilege will send setattr with both mode and size set. This confuses some FUSE filesystem. Therefore we send two FUSE operations, one for mode, and one for size.
- Remove node TTL handling for netbsd-5 for simplicity sake. The code still builds on netbsd-5 but does not have the node TTL feature anymore. It works fine with kernel support on netbsd-6.
|
|
Revision tags: yamt-pagecache-base5
|
| 1.18 |
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.17 |
21-Mar-2012 |
matt |
Use C89 function definition
|
| 1.16 |
08-Mar-2012 |
manu |
The kernel can lookup the same node multiple time and will reclaim as many times it looked up. All reclaims but the last one must be ignored, otherwise we discard a node which will still get operations. We therefore have to keep track of lookup/reclaim count and hnour reclaims only when the count reaches zero.
|
|
Revision tags: netbsd-6-base
|
| 1.15 |
29-Jan-2012 |
manu |
branches: 1.15.2; Improve FUSE trace facility
|
|
Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
|
| 1.14 |
30-Oct-2011 |
manu |
branches: 1.14.2; - Fix the confusion between fileno (opaque FUSE reference) and inode numbers. fileno must be used when exchanging FUSE messages. - Do not use kernel name cache anymore, as it caused modification from other machines to be invisible. - Honour name and attribute cache directive from FUSE filesystem
|
| 1.13 |
13-Aug-2011 |
christos |
- fix warn/err confusiog - fix debugging printf - add func arguments to simple formats
|
| 1.12 |
28-Jun-2011 |
manu |
Add support for extended attributes
|
|
Revision tags: cherry-xenmp-base
|
| 1.11 |
25-Apr-2011 |
manu |
- Implement proper unprivilegied user permission verifications Verification is now done in the lookup method, as it is the way to go. Of course there are corner cases, such as the sticky bit which need special handling in the remove method.
- Set full fsidx in vftstat method
- Do not pass O_APPEND to the filesystem. FUSE always sends the write offset, so setting O_APPEND is useless. If the filesystem uses it in an open(2) system call, it will even cause file corruptions, since offsets given to pwrite(2) will be ignored. This fix allows glusterfs to host a NetBSD ./build.sh -o build
- Do not use the FUSE access method, use getattr and check for permission on our own. The problem is that a FUSE filesystem will typically use the Linux-specific setfsuid() to perform access control. If that is missing, any chack is likely to occur on behalf of the user running the filesystem (typically root), causing access method to return wrong information.
- When possible, avoid performing a getattr method call and use cached value in puffs_node instead. We still retreive the latest value by calling getattr when performing append write operation, to minimize the chances that another writer appended since the last time we did.
- Update puffs_node cached file size in write method
- Remove unused argument to perfuse_destroy_pn()
|
|
Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
|
| 1.10 |
11-Oct-2010 |
manu |
Remove code supporting SOCK_STREAM, as SOCK_DGRAM works fine
|
| 1.9 |
11-Oct-2010 |
manu |
- fix access control: pcn->pcn_cred is not user credentials - Keep track of file generation - remove size tracking in pnd_size, we have it in pn_va.va_size
|
| 1.8 |
03-Oct-2010 |
manu |
- Correctly handle rename whith overwritten destination - Keep track of file name to avoid lookups when we can. This makes sure we do not have two cookies for the same inode, a situation that cause wreak havoc when we come to remove or rename a node. - Do not use PUFFS_FLAG_BUILDPATH at all, since we now track file names - In open, queue requests after checking for access, as there is no merit to queue a will-be-denied request while we can deny it immediatly - request reclaim of removed nodes at inactive stage
|
| 1.7 |
29-Sep-2010 |
manu |
= Open files = - Restore open on our own in fsycn and readdir, as the node may not already be open, and FUSE really wants it to be. No need to close immediatly, it can be done at inactive time.
= Write operations = - fix a nasty bug that corrupted files on write (written added twice) - Keep track of file size in order to honour PUFFS_IO_APPEND
= many fixes in rename = - handler overwritten nodes correctly - wait for all operations on the node to drain before doing rename, as filesystems may not cope with operations on a moving file. - setback PUFFS_SETBACK_INACT_N1 cannot be used from rename, we therefore miss the inactive time for an overwritten node. This bounds us to give up PUFFS_KFLAG_IAONDEMAND.
= Removed files = - forbid most operations on a removed node, return ENOENT - setback PUFFS_SETBACK_NOREF_N1 at inactive stage to cause removed file reclaim
= Misc = - Update outdated ARGSUSED for lint - Fix a memory leak (puffs_pn_remove instead of puffs_pn_put) - Do not use PUFFS_FLAG_BUILDPATH except for debug output. It makes the lookup code much simplier.
|
| 1.6 |
23-Sep-2010 |
manu |
== file close operations == - use PUFFS_KFLAG_WTCACHE to puffs_init so that all writes are immediatly send to the filesystem, and we do not have anymore write after inactive. As a consequence, we can close files at inactive stage, and there is not any concern left with files opened at create time. We also do not have anymore to open ourselves in readdir and fsync.
- Fsync on close (inactive stage). That makes sure we will not need to do these operations once the file is closed (FUSE want an open file). short sircuit the request that come after the close, bu not fsinc'ing closed files,
- Use PUFFS_KFLAG_IAONDEMAND to get less inactive calls
== Removed nodes == - more ENOENT retunred for operations on removed node (but there are probably some still missing): getattr, ooen, setattr, fsync
- set PND_REMOVE before sending the UNLINK/RMDIR operations so that we avoid races during UNLINK completion. Also set PND_REMOVED on node we overwirte in rename
== Filehandle fixes == - queue open operation to avoid getting two fh for one file
- set FH in getattr, if the file is open
- Just requires a read FH for fsyncdir, as we always opendir in read mode. Ok, this is misleading :-)
== Misc == - do not set FUSE_FATTR_ATIME_NOW in setattr, as we provide the time
- short circuit nilpotent operations in setattr
- add a filename diagnostic flag to dump file names
|
| 1.5 |
20-Sep-2010 |
manu |
- performance improvement for read, readdir and write. Now we use SOCK_DGRAM, we can send many pages at once without hitting any bug
- when creating a file, it is open for FUSE, but not for the kernel. If the kernel does not do a subsequent open, we have a leak. We fight against this by trying to close such file that the kernel left unopen for some time.
- some code refactoring to make message exchange debug easier (more to come)
|
| 1.4 |
03-Sep-2010 |
manu |
- Postpone file close at reclaim time, since NetBSD sends fsync and setattr(mtime, ctime) after close, while FUSE expects the file to be open for these operations
- remove unused argument to node_mk_common()
- remove requeued requests when they are executed, not when they are tagged for schedule
- try to make filehandle management simplier, by keeping track of only one read and one write filehandle (the latter being really read/write).
- when CREATE is not available, we use the MKNOD/OPEN path. Fix a bug here where we opened the parent directory instead of the node: add the missing lookup of the mknod'ed node.
- lookup file we just created: glusterfs does not really see them otherwise.
- open file when doing setattr(mtime, ctime) on non open files, as some filesystems seems to require it.
- Do not flush pagecache for removed nodes
- Keep track of read/write operations in progress, and at reclaim time, make sure they are over before closing and forgeting the file.
|
| 1.3 |
01-Sep-2010 |
manu |
Build fixes for LP64
|
| 1.2 |
26-Aug-2010 |
manu |
- open the file before doing fsync: glusterfs wants that.
- Automatically call fsync on close for files. If we just close, fsync will come later and we will have to reopen
- Add a PND_DIRTY flag to keep track of files that really need a sync. perfuse_node_fsync only calls the FUSE fsync method if there are data to push.
- Add a PND_OPEN flag to keep track of open files. Checking non NULL fh is not enough, as some filesystems will always set fh to 0.
- Add a sync diagnostic flag, to watch fsync and dirty flag activity. Make the fh diagnostic flag more verbose
- Send the fh in setattr (it was hardcoded to 0)
I am now able to build libperfuse in a glusterfs mounted filesystem. Yeah!
|
| 1.1 |
25-Aug-2010 |
manu |
libperfuse(3) is a PUFFS relay to FUSE. In order to use it, FUSE filesystem must be patched to #include <perfuse.h> in the source files that open /dev/fuse and perform the mount(2) system call. The FUSE filesystem must be linked with -lperfuse.
libperfuse(3) implements the FUSE kernel interface, on which libfuse or any FUSE filesystem that opens /dev/fuse directly can be used.
For now, an external daemon called perfused(8) is used. This may change in the future.
|