Commit Graph

300 Commits

Author SHA1 Message Date
Tofik Sonono
50c74e6459
Support application-defined I/O functions for FUSE fd
The io for FUSE requests and responses can now be further customized by allowing to write custom functions for reading/writing the responses. This includes overriding the splice io.

The reason for this addition is that having a custom file descriptor is not sufficient to allow custom io. Different types of file descriptor require different mechanisms of io interaction. For example, some file descriptor communication has boundaries (SOCK_DGRAM, EOF, etc...), while other types of fd:s might be unbounded (SOCK_STREAMS, ...). For unbounded communication, you have to read the header of the FUSE request first, and then read the remaining packet data. Furthermore, the one read call does not necessarily return all the data expected, requiring further
calls in a loop.
2023-01-10 10:04:35 +00:00
HereThereBeDragons
c0a344e379 Test for fuse_lowlevel_notify_expire_entry.
This test is too simple to check for all functionalities of notify_expire as it always successfully passes when libfuse supports the function (even if kernel does not support it -  it just takes it as notify_inval)
2023-01-06 18:35:52 +00:00
HereThereBeDragons
91083df90e adding comments and capability discovery, enum for flags moved to top of file 2023-01-06 18:35:52 +00:00
Bernd Schubert
af5710e7a3 fuse-loop/fuse_do_work: Avoid lots of thread creations/destructions
On benchmarking metadata operations with a single threaded bonnie++
and "max_idle_threads" limited to 1, 'top' was showing suspicious
160% cpu usage.
Profiling the system with flame graphs showed that an astonishing
amount of CPU time was spent in thread creation and destruction.

After verifying the code it turned out that fuse_do_work() was
creating a new thread every time all existing idle threads
were already busy. And then just a few lines later after processing
the current request it noticed that it had created too many threads
and destructed the current thread. I.e. there was a thread
creation/destruction ping-pong.

Code is changed to only create new threads if the max number of
threads is not reached.

Furthermore, thread destruction is disabled, as creation/destruction
is expensive in general.

With this change cpu usage of passthrough_hp went from ~160% to
~80% (with different values of max_idle_threads). And bonnie
values got approximately faster by 90%. This is a with single
threaded bonnie++
bonnie++ -x 4 -q -s0  -d <path> -n 30:1:1:10 -r 0

Without this patch, using the default max_idle_threads=10 and just
a single bonnie++ the thread creation/destruction code path is not
triggered.  Just one libfuse and one application thread is just
a corner case - the requirement for the issue was just
n-application-threads >= max_idle_threads.


Signed-off-by: Bernd Schubert <bschubert@ddn.com>
2022-09-04 13:07:15 +01:00
Dharmendra singh
646ff0bb3b Passthrough_ll should display cmd line options
Make passthrough_ll to display all its cmdline options
instead of keeping them hidden.
(I am not sure if these are intentionally kept hidden)
2022-04-08 15:36:01 +01:00
Bernd Schubert
f0bba7ef2a passthrough_hp: Disable splice with the --nosplice option
passthrough_hp was not updated when splice got enabled by default in libfuse3.
I.e. the --nosplice option and condition on it was a noop.
2022-03-31 15:27:02 +01:00
Bernd Schubert
f8a24e9ec7 passthrough_hp: Fix inode ref in sfs_unlink
sfs_unlink may call do_lookup(), which increases the inode ref count,
but since that function does not return attributes that lookup ref
count won't get automatically decreased.
2022-03-31 15:27:02 +01:00
Nikolaus Rath
66b04453b7
Merge branch 'master' into fopen_noflush 2022-03-14 09:25:00 +00:00
David Galeano
3c2ba7aa25
Removed duplicates code. (#642)
The cap for FUSE_CAP_WRITEBACK_CACHE was printed twice.
2022-02-11 20:07:00 +00:00
Amir Goldstein
1b498ac9b3 Add support for FOPEN_NOFLUSH flag
Allow requesting from kernel to avoid flush on close at file open
time.  If kernel does not support FOPEN_NOFLUSH flag, the request
will be ignored.

For passthrough_hp example, request to avoid flush on close when
writeback cache is disabled and file is opened O_RDONLY.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
2022-01-03 14:55:34 +02:00
Amir Goldstein
80f2b8b469 passthrough_hp: excercise reusing inode numbers
Before last unlink() release the reference on inode.fd to allow reuse
of underlying fs inode number, mark the server inode "deleted" and bump
it's generation counter.

When same inode number is found on lookup(), the server inode object will
be reused as well.

Skip this when inode has an open file and when writeback cache is enabled.

This will be used to verify inode reuse bug fix in the kernel.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
2021-06-14 09:13:12 +01:00
Christian Menges
57b46adc35
Cuse example: Fix memory leak (#607)
* cuse example: fix memory leak

* Travis CI: re-enable leak checking
2021-06-09 09:04:41 +01:00
Christian Menges
7d1ba6b066
Fix memory leaks in examples (#604) 2021-05-09 11:12:01 +01:00
Christian Menges
995d46a205
Bump cxxopts from 2.2.0 to 2.2.1 (#602) 2021-05-09 10:00:57 +01:00
Junichi Uekawa
8c4d315108
Fix doxygen warnings. (#600)
Some parameters were undocumented, and @file does not mean to expand current file name.
2021-05-07 10:43:30 +01:00
Jean-Pierre André
bdd2d4110f
Fix returning d_ino and d_type by readdir(3) in non-plus mode
When not using the readdir_plus mode, the d_type was not returned,
and the use_ino flag was not used for returning d_ino.

This patch fixes the returned values for d_ino and d_type by readdir(3)

The test for the returned value of d_ino has been adjusted to also
take the d_type into consideration and to check the returned values in
both basic readdir and readdir_plus modes. This is done by executing
the passthrough test twice.

Co-authored-by: Jean-Pierre André <jpandre@users.sourceforge.net>
2021-03-18 09:52:30 +00:00
Martin Pärtel
5012a05ac8
Fix returning inode numbers from readdir() in offset==0 mode. (#584)
- Test added for all passthrough examples.
- passthrough.c uses offset==0 mode. The others don't.
- passthrough.c changed to set FUSE_FILL_DIR_PLUS to make the test pass.
- This fixes #583.
2021-02-03 09:53:21 +00:00
Alan Somers
ccba27fbec
Fix FUSE_COPY_FILE_RANGE in the passthrough example (#575)
Only close the file descriptors if they were just opened.  Otherwise,
the second FUSE_COPY_FILE_RANGE operation on any given file will fail
with EBADF.
2021-01-01 19:34:58 +00:00
Rethan
1acfb20cb3
examples/cuse_client: add include file to eliminate compiler warning (#568)
Compiler warning about close(fd), add include file to fix.

Signed-off-by: haoyixing <haoyixing@kuaishou.com>
Co-authored-by: haoyixing <haoyixing@kuaishou.com>
2020-11-24 09:28:13 +00:00
Zhiqiang Liu
8b4c5d90ee example/cuse_client.c: fix fd leakage problem
In cuse_client.c, fd should be closed before return.
Otherwise, it will cause fd leakage problem.

Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
Signed-off-by: Haotian Li <lihaotian9@huawei.com>
2020-11-06 19:26:03 +00:00
Zhiqiang Liu
2a87b64af7 ioctl_client.c: fix potential fd leakage problem
In ioctl_client.c, fd is not closed before return, thus
it will cause fd leakage problem.

Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
Signed-off-by: Haotian Li <lihaotian9@huawei.com>
2020-11-06 19:26:03 +00:00
Etienne Dublé
ba3b225a12
Allow caching symlinks in kernel page cache. (#551)
This commit defines a new capability called `FUSE_CAP_CACHE_SYMLINKS`.
It is off by default but you can now enable it by setting this flag in
in the `want` field of the `fuse_conn_info` structure.

When enabled, the kernel will save symlinks in its page cache,
by making use of the feature introduced in kernel 4.20:
5571f1e654
2020-09-20 19:08:15 +01:00
AKowshik
86f40b8584
Updated example code to work with new API (#547) 2020-09-09 20:17:06 +01:00
AKowshik
c5e8684b5a
Fixed typo in command to compile program (#536) 2020-08-09 12:35:43 +01:00
Miklos Szeredi
ded868455a
passthrough_ll: remove symlink fallbacks (#514)
* passthrough_ll/hp: remove symlink fallbacks

Path lookup in the kernel has special rules for looking up magic symlinks
under /proc.  If a filesystem operation is instructed to follow symlinks
(e.g. via AT_SYMLINK_FOLLOW or lack of AT_SYMLINK_NOFOLLOW), and the final
component is such a proc symlink, then the target of the magic symlink is
used for the operation, even if the target itself is a symlink.  I.e. path
lookup is always terminated after following a final magic symlink.

I was erronously assuming that in the above case the target symlink would
also be followed, and so workarounds were added for a couple of operations
to handle the symlink case.  Since the symlink can be handled simply by
following the proc symlink, these workardouds are not needed.

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Co-authored-by: Miklos Szeredi <mszeredi@redhat.com>
2020-05-14 20:17:50 +01:00
Fabrice Fontaine
fc25c5002c
Do not require C++ compiler for building
Fixes:
 - http://autobuild.buildroot.org/results/a6e64213f2910b2b81e79cb1e96e558413d7f70a

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2020-04-20 20:20:19 +01:00
Dr. David Alan Gilbert
252e978c54
State GPL version in comment (#485)
IN a bunch of comments we say 'under the terms of the GNU GPL', make
it clear this is GPLv2 (as LICENSE says).

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
2020-03-13 16:46:44 +00:00
philmd
fd0403df03
passthrough_ll: Remove unneeded variable assignment (#501)
Fix warning reported by Clang static code analyzer:

  example/passthrough_ll.c:390:5: warning: Value stored to 'saverr' is never read
      saverr = ENOMEM;
      ^        ~~~~~~

Fixes: 4a92a82f2e
Reported-by: Clang Static Analyzer
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2020-02-24 21:42:41 +00:00
maxice8
562223325e
Include limits.h because of PATH_MAX usage. (#498)
Fixes build with musl libc on Alpine Linux.
2020-02-04 09:57:25 -05:00
zsugabubus
81ab7d8c8c
examples: mark ops variables constant (#496) 2020-01-30 11:17:25 -05:00
Misono Tomohiro
1caba629ff passthrough_ll: Use cache_readdir for directory open (#492)
Upstreamed from:
  https://www.redhat.com/archives/virtio-fs/2020-January/msg00106.html

Since keep_cache(FOPEN_KEEP_CACHE) has no effect for directory as
described in fuse_common.h, use cache_readdir(FOPEN_CACHE_DIR) for
diretory open when cache=always mode.

Signed-off-by: Misono Tomohiro <misono.tomohiro@jp.fujitsu.com>
2020-01-24 15:53:32 +00:00
Dr. David Alan Gilbert
aa1185e153 passthrough_ll: pass correct errno to fuse_reply_err()
fuse_reply_err() expects the error code, not its negative.

Upstreamed from https://www.redhat.com/archives/virtio-fs/2020-January/msg00000.html. Original commit message:

lo_copy_file_range() passes -errno to fuse_reply_err() and then fuse_reply_err()
changes it to errno again, so that subsequent fuse_send_reply_iov_nofree() catches
the wrong errno.(i.e. reports "fuse: bad error value: ...").

Make fuse_send_reply_iov_nofree() accept the correct -errno by passing errno
directly in lo_copy_file_range().

Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
Reviewed-by: Eryu Guan <eguan@linux.alibaba.com>

Co-authored-by: Xiao Yang <ice_yangxiao@163.com>
2020-01-06 20:32:51 +00:00
Bill Zissimopoulos
abdd45f83c Make ioctl prototype conditional on FUSE_USE_VERSION. (#482)
Define FUSE_USE_VERSION < 35 to get old ioctl prototype
with int commands; define FUSE_USE_VERSION >= 35 to get
new ioctl prototype with unsigned int commands.

Fixes #463.
2019-12-31 09:58:57 +00:00
Albert Chen
ada08d50a6 Added support for FUSE_EXPLICIT_INVAL_DATA to enable (#474) 2019-11-27 09:36:30 +00:00
Yuri Per
d735af94fa Implement lseek operation (#457) 2019-11-03 09:44:31 +00:00
Stefan Hajnoczi
fa0981fe80 passthrough_ll: drop lo_dirp->fd field (#464)
fdopendir(3) takes ownership of the file descriptor.  The presence of
the lo_dirp->fd field could lead to someone incorrectly adding a
close(d->fd) cleanup call in the future.

Do not store the file descriptor in struct lo_dirp since it is unused.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
2019-11-03 09:43:43 +00:00
Stefan Hajnoczi
a0d713619d passthrough_ll: use fuse_log() instead of err()/errx()
Send everything through fuse_log() instead of writing directly to
stderr.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2019-09-10 14:25:15 +01:00
Stefan Hajnoczi
0889da0a87 passthrough_ll: use fuse_log()
Make use of fuse_log() instead of printing directly to stderr.  This
demonstrates unified logging and also caught the fact that I forgot to
add fuse_log APIs to lib/fuse_versionscript.  So it's basically a test
case :).

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2019-09-10 14:25:15 +01:00
Dr. David Alan Gilbert
7c1e09dbc2 passthrough_ll: fix fallocate variant ifdefs (#449)
If fallocate isn't available we incorrectly check for the value of
HAVE_POSIX_FALLOCATE rather than it being defined.
We also fail to initialise 'err' in the case where neither are defined.

Fixes: 5fc562c90d ("Add fallocate and use it instead of ...")

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
2019-09-09 10:14:02 +01:00
Alan Somers
1f842c996e passthrough: fix unix-domain sockets on FreeBSD (#413)
FreeBSD doesn't allow creating sockets using mknod(2). Instead, one has to use socket(2)
and bind(2).  Add appropriate logic to the examples and add a test case.
2019-05-15 21:35:57 +01:00
Nikolaus Rath
7a5e1a9a9a Fix includes of non-system headers.
Fixes: #415.
2019-05-12 11:00:15 +01:00
Nikolaus Rath
055f272517 Added new example filesystem
passthrough_hp puts emphasis and performance and correctness, rather
than simplicity.
2019-05-09 14:16:37 -05:00
Nikolaus Rath
28d3699ce1 Fixed permissions. 2019-05-05 13:33:20 -04:00
Liu Bo
5fc562c90d Add fallocate and use it instead of posix_fallocate if possible (#398)
fuse.ko has supported FALLOC_FL_KEEP_SIZE and FALLOC_FL_PUNCH_HOLE at this
moment and more modes may be supported in the future.

fallocate(2) supports modes while posix_fallocate(2) does not, so this
makes lo_fallocate use fallocate(2) instead.

Signed-off-by: Liu Bo <bo.liu@linux.alibaba.com>
2019-04-18 09:55:42 +01:00
Chad Austin
6439231f9b Add documentation for opting out of opendir and releasedir (#391) 2019-04-16 19:44:59 +01:00
Jean-Pierre André
a1bff7dbe3 Defined the (*ioctl)() commands as unsigned int (#381)
Instead of the Posix ioctl(2) command, Linux uses its own variant of ioctl()
in which the commands are requested as "unsigned long" and truncated to
32 bits by the fuse kernel module. Transmitting the commands to user space
file systems as "unsigned int" is a workaround for processing ioctl()
commands which do not fit into a signed int.
2019-03-11 17:35:23 +00:00
Alan Somers
1b7d2b8862 Document fuse_fsync_in.fsync_flags and remove magic numbers (#375) 2019-03-08 21:24:50 +00:00
Forty-Bot
1cce958bb6 hello_ll: Fix null pointer dereference (#363)
If hello_ll is invoked without a mountpoint, it will try to call
fuse_session_mount anyway with the NULL mountpoint (which then causes a
segfault). Print out a short help message instead (taken from
passthrough_ll.c).
2019-02-25 21:06:42 +00:00
Miklos Szeredi
63d53ecc3a passthrough_ll: lo_create() should honor CACHE_NEVER (#345)
lo_create() did not honour CACHE_NEVER in lo_create(), which has an effect
on how I/O is performed after the open.

The value of CACHE_ALWAYS, which results in setting fi->keep_cache, only
has an effect for the state of the cache at open, and since the file was
just created the cache is always empty.  Hence setting this doesn't have an
effect on lo_create(), but keep it for symmetry with lo_open().
2019-01-22 20:03:00 +00:00
Nikolaus Rath
3bc72dafd2 Fixed memory leak.
Fixes: #338.
2018-12-29 14:52:51 +00:00
Nikolaus Rath
d4a7ba44b0 Fix fd/inode leak
If do_readdir() calls do_lookup(), but the latter fails, we still have
to return any entries that we already stored in the readdir buffer to
avoid leaking inodes.

do_lookup() may fail if e.g. we reach the file descriptor limit.
2018-11-27 20:58:36 +00:00
Nikolaus Rath
d1ab94c355 Avoid needless telldir() call. 2018-11-24 20:55:23 +00:00
Nikolaus Rath
c3c3a500a5 Fixed lookup-count leak in do_readdir(). 2018-11-24 20:55:23 +00:00
Nikolaus Rath
59dc22b12f Don't segfault when called with -h.
Fixes: #327
2018-11-24 20:51:34 +00:00
Niels de Vos
2548c4b83a examples: add copy_file_range() support to passthrough(_fh)
The passthrough example filesystem can be used for validating the API
and the implementation in the FUSE kernel module.
2018-11-19 12:33:56 +00:00
Nikolaus Rath
30415af0dc Don't crash if mountpoint is not specified.
Fixes: #319.
2018-11-09 10:45:27 +00:00
Miklos Szeredi
33e8796d56 passthrough_ll: initialize unused memory
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-10 10:49:48 +01:00
Miklos Szeredi
7c08db3f93 passthrough_ll: allow configuring caching
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-10 10:49:48 +01:00
Miklos Szeredi
fc9f632a21 passthrough_ll: add *xattr() operations
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-10 10:49:48 +01:00
Miklos Szeredi
e8225e8e87 passthrough_ll: add flock()
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-10 10:49:48 +01:00
Miklos Szeredi
cc892903a8 passthrough_ll: whitespace cleanup
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
2018-10-10 10:49:48 +01:00
Vivek Goyal
aca50428c0 passthrough_ll: add forget_multi()
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-10 10:49:48 +01:00
Vivek Goyal
e164f3ddb5 passthrough_ll: add source option
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-10 10:49:48 +01:00
Miklos Szeredi
4a92a82f2e passthrough_ll: add some of the missing operations
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-10 10:49:48 +01:00
Miklos Szeredi
610125f3c1 passthrough_ll: add is_symlink to lo_inode
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
2018-10-10 10:49:48 +01:00
Miklos Szeredi
dd8d21296c passthrough_ll: set umask at startup
Like all the other passthrough examples.

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
2018-10-10 10:49:48 +01:00
Miklos Szeredi
49676ed9cc passthrough_ll: fix refcount for "." and ".." entries
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-10 10:49:48 +01:00
Miklos Szeredi
c3fa857886 passthrough_ll: add locking to inode cache
Otherwise it may crash when running multithreaded.

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
2018-10-10 10:49:48 +01:00
Martin Blanchard
52469901fc Make meson build scripts subprojects friendly
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-08-25 20:17:39 +01:00
Rostislav Skudnov
a2a09e7cca example/{hello,null}: Fix memory leaks 2018-07-23 11:02:57 +01:00
Tomohiro Kusumi
1a4afa8029 Invert calloc(3) argument order (nmemb comes first)
No functional difference expected, but should still follow the standard.
http://pubs.opengroup.org/onlinepubs/009695399/functions/calloc.html
2018-04-13 10:14:46 -07:00
Tomohiro Kusumi
72ab7172b8 Fix build error on DragonFlyBSD (sync with other *BSD) (#240)
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-03-28 20:32:59 +01:00
Mateusz Urbańczyk
917e72973d Fix typo in "passthrough" docstring (#229) 2018-01-15 20:45:54 +00:00
Josh Soref
8157b4d9b9 Spelling (#223)
Fix spelling errors
2017-11-27 10:23:20 +00:00
Nikolaus Rath
f750abb757 Removed unneccessary #include <config.h> from examples
Fixes: #208.
2017-09-25 10:17:11 +01:00
Nikolaus Rath
21b55a05a1 example/ioctl: build on FreeBSD, but add protocol check instead. 2017-08-25 10:48:09 +02:00
Nikolaus Rath
6b0d363b6a examples/{ioctl,null}: don't build under FreeBSD instead of skipping tests. 2017-08-25 09:46:50 +02:00
Nikolaus Rath
b29faad9db printcap: use temporary directory, not file
Mounting a file doesn't seem to work under FreeBSD.
2017-08-24 21:56:00 +02:00
Nikolaus Rath
ad029c095c passthrough_ll: only active EXPORT_SUPPORT of supported by kernel. 2017-08-24 21:08:25 +02:00
Nikolaus Rath
30ead3a5cf Dropped support for building with autotools
It's just too much pain to keep it working.
2017-08-24 20:50:44 +02:00
Nikolaus Rath
fc83143867 Renamed notify_inval_inode_fh to invalidate_path
The previous name didn't make much sense.
2017-08-24 14:51:27 +02:00
Sławek Rudnicki
89f2bae00c Allow inode cache invalidation in high-level API
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-24 14:20:37 +02:00
Nikolaus Rath
4eed36910f Added examples/printcap 2017-08-23 23:39:27 +02:00
Nikolaus Rath
f88a285cf2 Make passthrough_fh work under FreeBSD. 2017-08-22 14:00:44 +02:00
Nikolaus Rath
e71bb48557 Fix two compiler warnings. 2017-08-22 13:59:17 +02:00
Nikolaus Rath
4fcb574d10 Don't build passthrough_ll under BSD. 2017-08-11 10:41:58 +02:00
Nikolaus Rath
b3109e71fa Added writeback cache to passthrough_ll
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-06 10:13:43 +02:00
Nikolaus Rath
5a0c88209d Removed compat stuff in passthrough_ll
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-06 10:13:43 +02:00
Nikolaus Rath
c36e7d528e passthrough_ll: added more debugging output 2017-08-04 22:42:22 +02:00
Nikolaus Rath
9dcc2d04ba Fix compilation on 32bit systems
Fixes: #185.
2017-08-03 12:58:09 +02:00
Banglang
c0476a9f54 Fix compiler warnings of gcc-5.4.x
Signed-off-by: Banglang <banglang.huang@foxmail.com>
2017-08-01 16:26:23 +02:00
Nikolaus Rath
e870a0427a Added public fuse_lib_help(), bumped minor version 2017-07-08 12:48:08 +02:00
Nikolaus Rath
f13526ed66 examples/passthrough_ll: added support for create() 2017-06-05 07:01:30 -04:00
Nikolaus Rath
bb3770f38a example/passthrough_ll: added write support 2017-06-05 06:57:36 -04:00
Nikolaus Rath
8d092c2be9 notify_store_retrieve(): fix race on unmount
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-31 13:43:54 -07:00
Nikolaus Rath
7d09db0e46 example/notify_store_retrieve: add debugging code for issue #105. 2017-05-31 12:54:19 -07:00
Nikolaus Rath
e6dd8ceb9e Revert "example/passthrough.c: add debugging code for issue #157."
This reverts commit 179fa13b40.
2017-05-31 12:35:16 -07:00
Nikolaus Rath
8641db4af7 passthrough_ll: document that fuse_ino_t and uintptr_t sizes must match
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-25 12:48:27 -07:00
Nikolaus Rath
179fa13b40 example/passthrough.c: add debugging code for issue #157. 2017-05-25 12:26:52 -07:00
Nikolaus Rath
20b24a16e1 passthrough: implemented create()
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-07 16:40:15 -07:00