History log of /src/lib/libperfuse/perfuse.c |
Revision | | Date | Author | Comments |
1.45 |
| 30-Mar-2024 |
andvar | s/Unfortunatley/Unfortunately/ in comment.
|
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.
|
1.42 |
| 17-Apr-2019 |
maya | fix typo
|
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.
|
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.
|
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.
|
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.
|
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()
|
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
|
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
|
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
|
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()
|
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.
|
1.23.2.3 |
| 30-Oct-2012 |
yamt | sync with head
|
1.23.2.2 |
| 23-May-2012 |
yamt | sync with head.
|
1.23.2.1 |
| 17-Apr-2012 |
yamt | sync with head
|
1.25.2.6 |
| 27-Feb-2015 |
martin | Pull up following revision(s) (requested by manu in ticket #1260): lib/libpuffs/puffs.3: revision 1,55,1.60 sys/fs/puffs/puffs_msgif.h: revision 1.84 lib/libperfuse/ops.c: revision 1.83 sys/fs/puffs/puffs_sys.h: revision 1.89 sys/fs/puffs/puffs_vfsops.c: revision 1.116 lib/libperfuse/perfuse.c: revision 1.36 sys/fs/puffs/puffs_vnops.c: revision 1.200-1.202
Use more markup. New sentence, new line. Bump date for previous.
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.
Update file size after write without metadata flush If we do not use metadata flush, we must make sure the size is updated in the filesystem after a write, otherwise the next GETATTR will get us a stale value and the file will be truncated.
|
1.25.2.5 |
| 03-Nov-2014 |
msaitoh | Pull up following revision(s) (requested by manu in ticket #1147): lib/libperfuse/perfuse.c: revision 1.34 lib/libperfuse/ops.c: revision 1.71 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.25.2.4 |
| 03-Nov-2014 |
msaitoh | Pull up following revision(s) (requested by manu in ticket #1140): lib/libperfuse/ops.c 1.63-1.69 lib/libperfuse/perfuse.c 1.32-1.33 lib/libperfuse/perfuse_priv.h 1.32-1.34 lib/libperfuse/subr.c 1.20 lib/libpuffs/creds.c 1.16 lib/libpuffs/dispatcher.c 1.47 lib/libpuffs/puffs.h 1.125 lib/libpuffs/puffs_ops.3 1.37-1.38 lib/libpuffs/requests.c 1.24 sys/fs/puffs/puffs_msgif.h 1.81 sys/fs/puffs/puffs_sys.h 1.85 sys/fs/puffs/puffs_vnops.c 1.183 usr.sbin/perfused/msg.c 1.22 Bring libpuffs, libperfuse and perfused on par with -current: - implement FUSE direct I/O - remove useless code and warnings - fix missing GETATTR bugs - fix exended attribute get and list operations
|
1.25.2.3 |
| 13-Sep-2012 |
riz | Pull up following revision(s) (requested by manu in ticket #554): lib/libperfuse/perfuse.c: revision 1.31 Turn a fatal error into a warning.
|
1.25.2.2 |
| 12-Aug-2012 |
martin | branches: 1.25.2.2.2; 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.25.2.1 |
| 23-Apr-2012 |
riz | Pull up following revision(s) (requested by manu in ticket #195): lib/libskey/skeysubr.c: revision 1.27 lib/libkvm/kvm_getloadavg.c: revision 1.11 lib/libwrap/update.c: revision 1.9 lib/liby/yyerror.c: revision 1.9 lib/libpuffs/puffs_ops.3: revision 1.30 lib/libwrap/misc.c: revision 1.10 lib/libwrap/hosts_access.c: revision 1.20 lib/libpuffs/pnode.c: revision 1.11 lib/libperfuse/subr.c: revision 1.17 lib/libpuffs/pnode.c: revision 1.12 lib/libperfuse/subr.c: revision 1.18 lib/libwrap/options.c: revision 1.15 lib/libwrap/fix_options.c: revision 1.11 lib/libperfuse/ops.c: revision 1.52 lib/libperfuse/ops.c: revision 1.53 lib/libperfuse/ops.c: revision 1.54 lib/libwrap/hosts_ctl.c: revision 1.5 lib/libintl/gettext.c: revision 1.27 lib/libwrap/shell_cmd.c: revision 1.6 lib/libpuffs/dispatcher.c: revision 1.39 lib/libperfuse/perfuse_priv.h: revision 1.27 lib/libwrap/socket.c: revision 1.19 lib/libpuffs/puffs.3: revision 1.50 lib/libperfuse/perfuse_priv.h: revision 1.28 lib/libpuffs/puffs_priv.h: revision 1.45 lib/libpuffs/puffs.3: revision 1.51 lib/libperfuse/perfuse_priv.h: revision 1.29 lib/libwrap/percent_x.c: revision 1.5 lib/libpuffs/puffs.3: revision 1.52 lib/libperfuse/debug.c: revision 1.11 sys/fs/puffs/puffs_vnops.c: revision 1.165 lib/libwrap/tcpd.h: revision 1.13 sys/fs/puffs/puffs_vnops.c: revision 1.166 lib/libwrap/eval.c: revision 1.7 sys/fs/puffs/puffs_msgif.h: revision 1.78 sys/fs/puffs/puffs_vfsops.c: revision 1.101 lib/libwrap/rfc931.c: revision 1.9 lib/libwrap/clean_exit.c: revision 1.5 lib/libpuffs/puffs.h: revision 1.120 lib/libc/stdlib/jemalloc.c: revision 1.27 lib/librmt/rmtlib.c: revision 1.26 lib/libpuffs/puffs.h: revision 1.121 sys/fs/puffs/puffs_sys.h: revision 1.79 lib/librumpclient/rumpclient.c: revision 1.48 lib/libwrap/refuse.c: revision 1.5 lib/libperfuse/perfuse.c: revision 1.26 lib/libperfuse/perfuse.c: revision 1.27 tests/fs/puffs/t_fuzz.c: revision 1.5 lib/libperfuse/perfuse.c: revision 1.28 lib/libpuffs/dispatcher.c: revision 1.40 sys/fs/puffs/puffs_node.c: revision 1.24 lib/libwrap/diag.c: revision 1.9 lib/libintl/textdomain.c: revision 1.13 Use C89 function definition Add name and atttribute cache with filesytem provided TTL. lookup, create, mknod, mkdir, symlink, getattr and setattr messages have been extended so that attributes and their TTL can be provided by the filesytem. lookup, create, mknod, mkdir, and symlink messages are also extended so that the filesystem can provide name TTL. Add PUFFS_KFLAG_CACHE_FS_TTL flag to puffs_init(3) to use name and attribute cache with filesystem provided TTL. lookup, create, mknod, mkdir, symlink, getattr and setattr messages have been extended so that attributes and their TTL can be provided by the filesytem. lookup, create, mknod, mkdir, and symlink messages are also extended so that the filesystem can provide name TTL. The filesystem updates attributes and TTL using puffs_pn_getvap(3), puffs_pn_getvattl(3), and puffs_pn_getcnttl(3) 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. Split file system. Comma fixes. Remove dangling "and". Bump date for previous. - Makesure update_va does not change vnode size when it should not. For instance when doing a fault-issued VOP_GETPAGES within VOP_WRITE, changing size leads to panic: genfs_getpages: past eof. -Handle ticks wrap around for vnode name andattribute timeout - 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() Do not set PUFFS_KFLAG_CACHE_FS_TTL for PUFFS tests
|
1.25.2.2.2.1 |
| 01-Nov-2012 |
matt | sync with netbsd-6-0-RELEASE.
|
1.31.10.6 |
| 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.31.10.5 |
| 06-Aug-2015 |
snj | branches: 1.31.10.5.4; Pull up following revision(s) (requested by christos in ticket #923): lib/libperfuse/perfuse.c: revision 1.37 Deal with limits properly. Don't print strerror() 2ice. XXX: pullup-7
|
1.31.10.4 |
| 27-Feb-2015 |
martin | Pull up following revision(s) (requested by manu in ticket #555): lib/libpuffs/puffs.3: revision 1.60 sys/fs/puffs/puffs_msgif.h: revision 1.84 lib/libperfuse/ops.c: revision 1.83 sys/fs/puffs/puffs_sys.h: revision 1.89 sys/fs/puffs/puffs_vfsops.c: revision 1.116 lib/libperfuse/perfuse.c: revision 1.36 sys/fs/puffs/puffs_vnops.c: revision 1.200-1.202
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.
Update file size after write without metadata flush If we do not use metadata flush, we must make sure the size is updated in the filesystem after a write, otherwise the next GETATTR will get us a stale value and the file will be truncated.
|
1.31.10.3 |
| 05-Nov-2014 |
snj | Pull up following revision(s) (requested by manu in ticket #181): lib/libperfuse/fuse.h: revision 1.6 lib/libperfuse/ops.c: revision 1.78 lib/libperfuse/perfuse.c: revision 1.35 lib/libperfuse/perfuse_priv.h: revision 1.36 lib/libpuffs/dispatcher.c: revision 1.48 lib/libpuffs/opdump.c: revision 1.37 lib/libpuffs/puffs.c: revision 1.118 lib/libpuffs/puffs.h: revision 1.126 lib/libpuffs/puffs_ops.3: revisions 1.40-1.41 sys/fs/puffs/puffs_msgif.h: revision 1.82-1.83 sys/fs/puffs/puffs_msgif.h: revision 1.82 sys/fs/puffs/puffs_vnops.c: revision 1.196 Add PUFFS support for fallocate and fdiscard operations -- libpuffs support for fallocate and fdiscard operations -- Add PUFFS_HAVE_FALLOCATE in puffs_msgif.h so that filesystem can decide at build time wether fallocate is usable -- FUSE fallocate support There seems to be no fdiscard FUSE operation at the moment, hence that one is left unused.
|
1.31.10.2 |
| 11-Sep-2014 |
martin | Pull up following revision(s) (requested by manu in ticket #86): lib/libperfuse/perfuse.c: revision 1.34 lib/libperfuse/ops.c: revision 1.71 Improve POSIX compliance of FUSE filesystems through PERDUSE - 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.31.10.1 |
| 24-Aug-2014 |
martin | Pull up following revision(s) (requested by manu in ticket #52): lib/libperfuse/perfuse_priv.h: revision 1.33 lib/libperfuse/ops.c: revision 1.67 lib/libpuffs/dispatcher.c: revision 1.47 lib/libperfuse/perfuse_priv.h: revision 1.34 lib/libperfuse/ops.c: revision 1.68 lib/libperfuse/ops.c: revision 1.69 lib/libpuffs/puffs_ops.3: revision 1.37 lib/libpuffs/puffs_ops.3: revision 1.38 lib/libperfuse/perfuse.c: revision 1.32 lib/libperfuse/perfuse.c: revision 1.33 usr.sbin/perfused/msg.c: revision 1.22 lib/libpuffs/puffs.h: revision 1.125 Implement FUSE direct I/O. Remove useless code and warnings
|
1.31.10.5.4.1 |
| 18-Jan-2017 |
skrll | Sync with netbsd-5
|
1.37.2.1 |
| 04-Nov-2016 |
pgoyette | Sync with HEAD
|
1.40.14.1 |
| 10-Jun-2019 |
christos | Sync with HEAD
|
1.40.12.1 |
| 26-Nov-2018 |
pgoyette | Sync with HEAD, resolve a couple of conflicts
|
1.40.6.1 |
| 10-Feb-2019 |
martin | Pull up following revision(s) (requested by manu in ticket #1186):
lib/libperfuse/perfuse.c: revision 1.41 lib/libperfuse/perfuse_priv.h: revision 1.37 lib/libperfuse/ops.c: revision 1.85 lib/libperfuse/ops.c: revision 1.86 lib/libperfuse/debug.c: revision 1.13
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.
-
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.
|