History log of /src/lib/libperfuse/perfuse_if.h |
Revision | | Date | Author | Comments |
1.25 |
| 13-May-2023 |
andvar | fix typos in comments.
|
1.24 |
| 12-Dec-2021 |
andvar | fix typos in word "request(s)".
|
1.23 |
| 05-Mar-2020 |
msaitoh | miscelaneous -> miscellaneous in comment.
|
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.
|
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
|
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
|
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
|
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.
|
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.
|
1.17.2.2 |
| 30-Oct-2012 |
yamt | sync with head
|
1.17.2.1 |
| 17-Apr-2012 |
yamt | sync with head
|
1.18.2.2 |
| 12-Aug-2012 |
martin | Pull up following revision(s) (requested by manu in ticket #438): lib/libperfuse/perfuse_priv.h: revision 1.31 sys/fs/puffs/puffs_msgif.h: revision 1.80 sys/fs/puffs/puffs_vnops.c: revision 1.171 lib/libpuffs/puffs_ops.3: revision 1.31 sys/fs/puffs/puffs_vnops.c: revision 1.172 sys/fs/puffs/puffs_vnops.c: revision 1.173 sys/fs/puffs/puffs_vnops.c: revision 1.174 usr.sbin/perfused/perfused.c: revision 1.24 sys/fs/puffs/puffs_sys.h: revision 1.80 sys/fs/puffs/puffs_sys.h: revision 1.81 sys/fs/puffs/puffs_sys.h: revision 1.82 lib/libperfuse/subr.c: revision 1.19 lib/libperfuse/perfuse.c: revision 1.30 sys/fs/puffs/puffs_msgif.c: revision 1.90 sys/fs/puffs/puffs_msgif.c: revision 1.91 sys/fs/puffs/puffs_msgif.c: revision 1.92 lib/libperfuse/ops.c: revision 1.59 lib/libpuffs/puffs.3: revision 1.53 lib/libperfuse/debug.c: revision 1.12 lib/libpuffs/puffs.3: revision 1.54 sys/fs/puffs/puffs_vnops.c: revision 1.167 sys/fs/puffs/puffs_msgif.h: revision 1.79 usr.sbin/perfused/msg.c: revision 1.21 sys/fs/puffs/puffs_vfsops.c: revision 1.102 sys/fs/puffs/puffs_vfsops.c: revision 1.103 sys/fs/puffs/puffs_vfsops.c: revision 1.105 lib/libpuffs/puffs.h: revision 1.123 lib/libperfuse/perfuse_if.h: revision 1.20 lib/libperfuse/perfuse.c: revision 1.29 lib/libpuffs/dispatcher.c: revision 1.42 lib/libpuffs/dispatcher.c: revision 1.43 - 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. - Improve PUFFS_KFLAG_CACHE_FS_TTL by reclaiming older inactive nodes. The normal kernel behavior is to retain inactive nodes in the freelist until it runs out of vnodes. This has some merit for local filesystems, where the cost of an allocation is about the same as the cost of a lookup. But that situation is not true for distributed filesystems. On the other hand, keeping inactive nodes for a long time hold memory in the file server process, and when the kernel runs out of vnodes, it produce reclaim avalanches that increase lattency for other operations. We do not reclaim inactive vnodes immediatly either, as they may be looked up again shortly. Instead we introduce a grace time and we reclaim nodes that have been inactive beyond the grace time. - Fix lookup/reclaim race condition. The above improvement undercovered a race condition between lookup and reclaim. If we reclaimed a vnode associated with a userland cookie while a lookup returning that same cookiewas inprogress, then the kernel ends up with a vnode associated with a cookie that has been reclaimed in userland. Next operation on the cookie will crash (or at least confuse) the filesystem. We fix this by introducing a lookup count in kernel and userland. On reclaim, the kernel sends the count, which enable userland to detect situation where it initiated a lookup that is not completed in kernel. In such a situation, the reclaim must be ignored, as the node is about to be looked up again. Fix hang unmount bug introduced by last commit. We introduced a slow queue for delayed reclaims, while the existing queue for unmount, flush and exist has been renamed fast queue. Both queues had timestamp for when an operation should be done, but it was useless for the fast queue, which is always used to run an operation ASAP. And the timestamp test had an error that turned ASAP into "at next tick", but nobody what there to wake the thread at next tick, hence the hang. The fix is to remove the useless and buggy timestamp test for fast queue. Rename slow sopreq queue into node sopreq queue, to refet the fact that is only intended for postponed node reclaims. When purging the node sopreq queue, do not call puffs_msg_sendresp(), as it makes no sense. Fix race condition between (create|mknod|mkdir|symlino) and reclaim, just like we did it between lookup and reclaim. Missing bit in previous commit (prevent race between create|mknod|mkdir|symlink and reclaim) Bump date for previous. New sentence, new line; remove trailing whitespace; fix typos; punctuation nits. 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. Missing bit in previous commit (PUFFS_KFLAG_CACHE_DOTDOT option to avoid looking up ..)
|
1.18.2.1 |
| 24-Jun-2012 |
jdc | Pull up revisions: src/lib/libperfuse/perfuse_if.h revision 1.19 src/usr.sbin/perfused/perfused.c revision 1.23 (requested by manu in ticket #348).
Add placeholder so that we can later add allbacks without breaking the ABI
|
1.20.16.1 |
| 18-Jan-2017 |
skrll | Sync with netbsd-5
|
1.20.14.1 |
| 04-Nov-2016 |
pgoyette | Sync with HEAD
|
1.20.10.1 |
| 01-Nov-2016 |
snj | Pull up following revision(s) (requested by manu in ticket #1266): lib/libperfuse/fuse.h: revision 1.7 lib/libperfuse/libperfuse.3: revision 1.4, 1.5 lib/libperfuse/perfuse.c: revision 1.38-1.40 lib/libperfuse/perfuse_if.h: revision 1.21, 1.22 usr.sbin/perfused/msg.c: revision 1.23, 1.24 usr.sbin/perfused/perfused.8: revision 1.12 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. -- make this compile again, and simplify. -- Sort sections. new sentence, new line. Whitespace. -- make the env stuff visible. -- remove dup function
|
1.22.14.1 |
| 08-Apr-2020 |
martin | Merge changes from current as of 20200406
|