Commit Graph

167 Commits

Author SHA1 Message Date
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
Nikolaus Rath
0986255688 example/passthrough: use fi->fh for read, write, fallocate
No reason not to use it. May even be a little faster and will
consume less resources :-).
2017-04-07 16:40:15 -07:00
Nikolaus Rath
76218eb461 passthrough:truncate(): work on file descriptor when possible
This allows truncating an open file even if write permission
was removed after open() (which is the expected behavior).
2017-04-07 16:40:15 -07:00
Nikolaus Rath
db1c6adb18 example/passthrough: close open files in release()
That way we can use the file descriptor for other operations.
2017-04-07 16:40:15 -07:00
Nikolaus Rath
f7c5d10ce5 passthrough, passthrough_fh: disable attribute caching
Required for better hardlink handling, see comments in patch.
2017-04-07 16:40:15 -07:00
Nikolaus Rath
abae573495 passthrough_ll: document that functionality is restricted 2017-04-07 16:40:15 -07:00
guraga
aa1460ff43 hello.c: don't use constant instead of magic number 2017-03-28 08:57:23 -07:00
Nikolaus Rath
c3d30f931a passthrough_fh: declare support for . and .. lookups. 2017-03-15 16:49:27 -07:00
Nikolaus Rath
9f96db7125 Added experimental support for building with Meson+Ninja 2017-01-12 15:19:04 -08:00
Nikolaus Rath
3006686b53 Replaced evil pointer magic with offsetof()
This triggered undefined behaviour warnings from UBSan.
2017-01-12 15:19:04 -08:00
Nikolaus Rath
8d2b94a8ae Return with exitcode 0 if there are no errors. 2017-01-11 20:41:48 -08:00
Nikolaus Rath
8e69b19cdc Added documentation and test case for null example 2016-12-23 18:31:45 -08:00
Nikolaus Rath
d6e86a7c40 Fixed use of uninitialized memory. 2016-12-23 18:31:34 -08:00
Csaba Henk
c005ff3288 Revert "Dropped example/null.c"
This reverts commit d5cdbb94a0.

null works completely fine, just the mountpoint should
be a regular file -- so there is no need to dismiss it.

Also:
- fixing up compiler warnings
- checking if the mountpoint is a regular file
2016-12-23 18:14:22 -08:00
Jay Hankins
d6d3e50a51 Fix a grammatical error. 2016-12-04 11:04:10 -08:00
Przemyslaw Pawelczyk
cac5660f2b examples/passthrough_ll.c: Include <limits.h> (for PATH_MAX macro).
Otherwise building w/o optimization (-O0) fails.

    passthrough_ll.c: In function 'lo_readlink':
    passthrough_ll.c:251:11: error: 'PATH_MAX' undeclared (first use in this function)
      char buf[PATH_MAX + 1];

(gcc v5.3.0 in Alpine Linux v3.4.6 x86_64 w/ musl-libc v1.1.14.)
2016-11-28 21:35:05 -08:00
Przemyslaw Pawelczyk
237c5c1cb5 examples/passthrough_ll.c: Close root fd before application ends.
If we want to do, what system would do anyway upon program termination,
then let's try to be a bit more scrupulous.
2016-11-28 21:35:05 -08:00
Przemyslaw Pawelczyk
a3fda25b7d examples/passthrough_ll.c: Fix segfault when showing help or version.
root lo_inode's next and prev were not set early enough, which led to
accessing addr 0x8 (or 0x4, depending on ptr size) when setting prev
variable in lo_free(lo.root.next), because lo.root.next was NULL.
2016-11-28 21:35:05 -08:00
divinity76
776ef9f83b silence bogus eclipse linter warning
"No break at the end of case	cuse.c     /example     line 235  Code Analysis Problem"
2016-10-31 14:39:20 +01:00
Nikolaus Rath
7983414b33 Clean-up doxygen documentation
Fixes: #81.
2016-10-28 20:44:39 -07:00
Nikolaus Rath
1d9f26f373 Turn fuse_operations.nopath_flag into fuse_config.nullpath_ok
Modifying struct fuse_config in the init() handler is the canonical way
to adjust file-system implementation specific settings. There is no need
to have flags in struct fuse_operations.
2016-10-20 15:45:32 -07:00
Nikolaus Rath
8ee553dac0 fuse_new(): don't accept options that don't make sense for end-users
Several options (use_ino, etc) depend on the file system
implementation. Allowing them to be set from the command line makes no
sense.
2016-10-20 15:32:20 -07:00
Nikolaus Rath
b16650830d Make --help output more suitable for end-user
We now only list options that are potentially useful for an
end-user (and unlikely to accidentally break a file system). The full
list of FUSE options has been moved to the documentation of the
fuse_new() and fuse_session_new() functions.
2016-10-15 19:46:57 -07:00
Nikolaus Rath
73b6ff4b75 Pass fuse_file_info to getattr, chown, chmod, truncate, utimens handlers
This obsoletes the ftruncate & fgetattr handlers.

Fixes #58.
2016-10-15 18:46:27 -07:00
Nikolaus Rath
d49f2e77b4 Unify handling of fuse_conn_info options
Instead of using command line options to modify struct fuse_conn_info
before and after calling the init() handler, we now give the file system
explicit control over this.
2016-10-15 16:49:23 -07:00
Nikolaus Rath
2bfa342cda Make -o clone_fd into a parameter of session_loop_mt().
This option really affects the behavior of the session loop, not the
low-level interface. Therefore, it does not belong in the fuse_session
object.
2016-10-13 10:35:12 -07:00
Nikolaus Rath
2044df660f Fix race condition in notify_* examples
The fix in commit cf4159156b was incomplete. While some false positives
are caused by sleep() in the file system taking longer than expected,
there was also a race condition where the file system would run before
the contents are initialized properly.
2016-10-10 11:47:29 -07:00
Nikolaus Rath
b69192b629 fuse_main(): extend support for printing help
There's now a way to inhibit the "usage" line (which actually got lost
in commit 225c12aebf), which makes it easier for simply file-systems
to generate good-looking --help output.
2016-10-10 09:41:17 -07:00
Nikolaus Rath
10e718b8ca Use NULL as option processor where possible. 2016-10-09 22:56:51 -07:00
Nikolaus Rath
35ce627e35 Renamed cuses example and added test program
An earlier version of the fioclient.c example was intended to be
used together with cusexmp.c. The former has since evolved into
ioctl_client.c and no longer has the function necessary to test
CUSE. Therefore, we've added a new cuse_client.c that is clearly
associated with the cuse.c example file system.
2016-10-09 22:03:07 -07:00
Nikolaus Rath
7e562d59d4 Don't confuse lookup count for mountpoint and file
I think this is the reason for a sporadic test failure, where
fuse_lowlevel_notify_store() fails.
2016-10-09 22:03:07 -07:00
Nikolaus Rath
64c97de5be Renamed timefsN examples to fuse_notify_*
This should make it more obvious at first glance what the different
examples do.
2016-10-09 22:03:07 -07:00
Nikolaus Rath
a668d264d6 Include testfsN examples in Doxygen documentation. 2016-10-09 22:03:07 -07:00
Nikolaus Rath
bcad1a6f22 Renamed ioctl and poll examples
The new names should make it more obvious at first glance
what each example demonstrates.
2016-10-09 22:03:07 -07:00