aboutsummaryrefslogtreecommitdiff
path: root/example
AgeCommit message (Collapse)Author
2018-11-09Don't crash if mountpoint is not specified.Nikolaus Rath
Fixes: #319.
2018-10-10passthrough_ll: initialize unused memoryMiklos Szeredi
For '.' and '..' entries only the file type in e.attr.st_mode and the inode number in e.attr.st_ino are used. But it's prudent to at least initialize the other fields of struct fuse_entry_param as well, instead of using random values from the stack.
2018-10-10passthrough_ll: allow configuring cachingMiklos Szeredi
Caching can be controlled with the following options: "cache=never": disable caching "cache=normal": enable caching but also refresh after the timeout "cache=always": never refresh cache The timeout can be controlled with the "timeout=SEC" option, where SEC is the number of seconds and can be an arbitrary non-negative floating point number. Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
2018-10-10passthrough_ll: add *xattr() operationsMiklos Szeredi
The extended attribute functionality is enabled with the "xattr" option (default) and disabled with the "no_xatt" option. New operations added: - getxattr - listxattr - setxattr - removexattr Caveat: none of these operations will work on a symbolic link, because it's difficult to implement that without races that can result in incorrect operation. Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
2018-10-10passthrough_ll: add flock()Miklos Szeredi
Conditionally enable flock() locking on underlying filesystem, based on the flock/no_flock options. Default is "no_flock", meaning locking will be local to the fuse filesystem and won't be propagated to the filesystem passed through. Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
2018-10-10passthrough_ll: whitespace cleanupMiklos Szeredi
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
2018-10-10passthrough_ll: add forget_multi()Vivek Goyal
Add method forget_multi() to forget multiple inodes in a single message. Signed-off-by: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
2018-10-10passthrough_ll: add source optionVivek Goyal
Right now, passthrough_ll will use "/" as source directory for passthrough. We need more flexibility where user can specify path of directory to be passed through. Hence add an option "source=<source-dir>". Signed-off-by: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
2018-10-10passthrough_ll: add some of the missing operationsMiklos Szeredi
New operations added: - mkdir - mknod - symlink - link - unlink - rmdir - rename - setattr - fsyncdir - flush - fsync - statfs - fallocate Caveats: - The utimes(2) family of syscalls will fail on symlinks on 4.18 and earlier kernels. Hoping to add support to later kernels. - The link(2) and linkat(2) system calls will fail on symlinks unless running with privileges (CAP_DAC_READ_SEARCH). Signed-off-by: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
2018-10-10passthrough_ll: add is_symlink to lo_inodeMiklos Szeredi
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
2018-10-10passthrough_ll: set umask at startupMiklos Szeredi
Like all the other passthrough examples. Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
2018-10-10passthrough_ll: fix refcount for "." and ".." entriesMiklos Szeredi
Kernel is not expecting an elevated lookup count for the "." and ".." entries when doing READDIRPLUS. Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
2018-10-10passthrough_ll: add locking to inode cacheMiklos Szeredi
Otherwise it may crash when running multithreaded. Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
2018-08-25Make meson build scripts subprojects friendlyMartin Blanchard
Multiple meson build scripts improvements including: * Bump meson requirement to 0.40.1 (0.40 already required) * Declare a dependency object for main library * Stop using add_global_arguments() * Various minor style fixes
2018-07-23example/{hello,null}: Fix memory leaksRostislav Skudnov
2018-04-13Invert calloc(3) argument order (`nmemb` comes first)Tomohiro Kusumi
No functional difference expected, but should still follow the standard. http://pubs.opengroup.org/onlinepubs/009695399/functions/calloc.html
2018-03-28Fix build error on DragonFlyBSD (sync with other *BSD) (#240)Tomohiro Kusumi
DragonFlyBSD has no "bsd" in uname, so add 'dragonfly' to conditionals. -- e.g. uname(1) in DragonFlyBSD [root@ ~]# uname DragonFly [root@ ~]# python -c "import sys; print(sys.platform)" dragonfly5
2018-01-15Fix typo in "passthrough" docstring (#229)Mateusz Urbańczyk
2017-11-27Spelling (#223)Josh Soref
Fix spelling errors
2017-09-25Removed unneccessary #include <config.h> from examplesNikolaus Rath
Fixes: #208.
2017-08-25example/ioctl: build on FreeBSD, but add protocol check instead.Nikolaus Rath
2017-08-25examples/{ioctl,null}: don't build under FreeBSD instead of skipping tests.Nikolaus Rath
2017-08-24printcap: use temporary directory, not fileNikolaus Rath
Mounting a file doesn't seem to work under FreeBSD.
2017-08-24passthrough_ll: only active EXPORT_SUPPORT of supported by kernel.Nikolaus Rath
2017-08-24Dropped support for building with autotoolsNikolaus Rath
It's just too much pain to keep it working.
2017-08-24Renamed notify_inval_inode_fh to invalidate_pathNikolaus Rath
The previous name didn't make much sense.
2017-08-24Allow inode cache invalidation in high-level APISławek Rudnicki
We re-introduce the functionality of invalidating the caches for an inode specified by path by adding a new routine fuse_invalidate_path. This is useful for network-based file systems which use the high-level API, enabling them to notify the kernel about external changes. This is a revival of Miklos Szeredi's original code for the fuse_invalidate routine.
2017-08-23Added examples/printcapNikolaus Rath
2017-08-22Make passthrough_fh work under FreeBSD.Nikolaus Rath
2017-08-22Fix two compiler warnings.Nikolaus Rath
2017-08-11Don't build passthrough_ll under BSD.Nikolaus Rath
2017-08-06Added writeback cache to passthrough_llNikolaus Rath
This fixes issue #191 (where the test was done by simply adding FUSE_CAP_WRITEBACK_CACHE without adjusting the flags in the open() call). Fixes: #191.
2017-08-06Removed compat stuff in passthrough_llNikolaus Rath
As the comment says, this made it compile but not work. If there is a need, we can add these checks to meson.build to only build this file if the prerequisites are satisfied.
2017-08-04passthrough_ll: added more debugging outputNikolaus Rath
2017-08-03Fix compilation on 32bit systemsNikolaus Rath
Fixes: #185.
2017-08-01Fix compiler warnings of gcc-5.4.xBanglang
Signed-off-by: Banglang <banglang.huang@foxmail.com>
2017-07-08Added public fuse_lib_help(), bumped minor versionNikolaus Rath
2017-06-05examples/passthrough_ll: added support for create()Nikolaus Rath
2017-06-05example/passthrough_ll: added write supportNikolaus Rath
2017-05-31notify_store_retrieve(): fix race on unmountNikolaus Rath
update_fs_loop() is still running when the filesystem unmounts, but it that case calls to fuse_lowlevel_notify_* will fail. Fixes: #105.
2017-05-31example/notify_store_retrieve: add debugging code for issue #105.Nikolaus Rath
2017-05-31Revert "example/passthrough.c: add debugging code for issue #157."Nikolaus Rath
This reverts commit 179fa13b40387645e722089873079488f9dbe3d8.
2017-05-25passthrough_ll: document that fuse_ino_t and uintptr_t sizes must matchNikolaus Rath
We can consider changing the code to drop the requirement if it turns out that there's a system where this isn't given. Fixes issue #167.
2017-05-25example/passthrough.c: add debugging code for issue #157.Nikolaus Rath
2017-04-07passthrough: implemented create()Nikolaus Rath
This allows calls like open(file, O_CREAT|O_RDONLY, 0200) which would otherwise fail because we cannot open the file after mknod() has created it with 0200 permissions.
2017-04-07example/passthrough: use fi->fh for read, write, fallocateNikolaus Rath
No reason not to use it. May even be a little faster and will consume less resources :-).
2017-04-07passthrough:truncate(): work on file descriptor when possibleNikolaus Rath
This allows truncating an open file even if write permission was removed after open() (which is the expected behavior).
2017-04-07example/passthrough: close open files in release()Nikolaus Rath
That way we can use the file descriptor for other operations.
2017-04-07passthrough, passthrough_fh: disable attribute cachingNikolaus Rath
Required for better hardlink handling, see comments in patch.
2017-04-07passthrough_ll: document that functionality is restrictedNikolaus Rath