Commit Graph

1645 Commits

Author SHA1 Message Date
Kirill Smelkov
249942f641 Sync fuse_kernel.h with Linux 5.2 (#433) 2019-07-09 13:54:09 -07:00
Nikolaus Rath
82e10e576e Released 3.6.2 2019-07-09 05:36:50 -07:00
Nikolaus Rath
65075085b5 Do not run passthrough test when caching is active.
Readdir caching means that direct modifications to the source
directory will not be seen immediately, so the test becomes flaky.

Fixes: #416.
2019-07-09 05:29:49 -07:00
Nikolaus Rath
a0b9cb9d76 Install init script in /etc/ instead of $sysconfdir
sysconfdir defaults to /usr/local/etc which is almost always the wrong
choice.

Fixes: #427
2019-07-09 05:15:09 -07:00
Nikolaus Rath
4cfbc27d4e
test_cuse: fix runtime error
We are no longer using the capfd mechanism.
2019-07-05 11:03:31 +01:00
Nikolaus Rath
1343f59c27 Fix output checking in test cases
py.test's capture plugin does not work reliably when used by
other fixtures. Therefore, implement our own version.
2019-07-04 21:20:41 +01:00
DrDaveD
be8db96603 Add build option to skip steps requiring root permissions 2019-07-04 09:02:30 +01:00
Michael Forney
f0c52798b7 Fix build with IGNORE_MTAB (#425)
chdir_to_parent and check_is_mount are used by should_auto_mount, added
in fuse-3.3.0, regardless of whether IGNORE_MTAB is defined.
2019-06-15 11:16:45 +01:00
Nikolaus Rath
38c947503d Released 3.6.1 2019-06-13 15:25:07 +01:00
Nikolaus Rath
be1c469530 Released 3.6.0 2019-06-13 13:01:10 +01:00
scosu
027d0d17c8 fuse_lowlevel: Add max_pages support (#384)
Starting with kernel version 4.20 fuse supports a new property
'max_pages' which is the maximum number of pages that can be used per
request. This can be set via an argument during initialization.
This new property allows writes to be larger than 128k.

This patch sets the property if the matching capability is set
(FUSE_MAX_PAGES). It will also set max_write to 1MiB. Filesystems have
the possibility to decrease this size by setting max_write to a smaller
size. The max_pages and bufsize fields are adjusted accordingly.

Cc: Constantine Shulyupin <const@MakeLinux.com>
Signed-off-by: Markus Pargmann <scosu@quobyte.com>
2019-06-13 12:59:10 +01:00
Michael Forney
63c11456d4 Avoid pointer arithmetic with void *
The pointer operand to the binary `+` operator must be to a complete
object type. Since we are working with byte sizes, use `char *` instead.
2019-06-06 13:31:41 +01:00
Michael Forney
a6024d4bf8 Don't return expression in function returning void
This is a constraint violation in ISO C[0].

[0] http://port70.net/~nsz/c/c11/n1570.html#6.8.6.4p1
2019-06-06 13:31:41 +01:00
Michael Forney
a9752e5f74 Don't omit second operand to ? operator
This is a GNU C extension.
2019-06-06 13:31:41 +01:00
Alan Somers
f6691d0a20 Remove incorrect comment about fuse_entry_param.generation (#420)
A comment said that fuse_entry_param.generation must be non-zero.
However, I can't find anything in the kernel that requires that, and
real-world file systems don't seem to follow that advice, either.
2019-05-24 08:54:42 +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
DrDaveD
625ed81b82 add defines for missing SECBITs on older kernels (#409) 2019-05-05 14:15:13 -04:00
Nikolaus Rath
0c59e2b509 Fixed type of ioctl command parameter. 2019-05-05 14:15:13 -04:00
Nikolaus Rath
28d3699ce1 Fixed permissions. 2019-05-05 13:33:20 -04:00
Fedor Korotkov
6c23ff3574 Fixed Cirrus Config (#405) 2019-05-01 08:19:11 -07:00
Alan Somers
5b7294ccd5 Add CI for FreeBSD (#404)
Fixes #403
2019-05-01 08:04:26 -07:00
Nikolaus Rath
f2df33e020 Added issue template. 2019-04-30 06:14:58 -07:00
Nikolaus Rath
d45fec1451 Added information about development status. 2019-04-30 06:03:48 -07: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
Nikolaus Rath
9ec8e1c940 Released 3.5.0 2019-04-16 19:46:20 +01:00
Chad Austin
6439231f9b Add documentation for opting out of opendir and releasedir (#391) 2019-04-16 19:44:59 +01:00
Nikolaus Rath
7bf25b6987 Bump minor version
cache_readdir flag is a new feature.
2019-04-07 15:21:53 +01:00
Nikolaus Rath
1552b467fc Add support for in-kernel readdir caching.
Fixes: #394.
2019-04-06 18:34:57 +01:00
Nikolaus Rath
4ae58ffd9b Synchronize fuse_kernel.h with current kernel master. 2019-04-06 17:57:44 +01:00
Nikolaus Rath
87b907808d Delete FUSE_FSYNC_FDATASYNC
This constant is not defined in the kernel, so it will be lost when
fuse_kernel.h is not synchronized. Instead, the kernel just passes a
flag value of "1", so for now we also use a literal in userspace.
2019-04-06 17:56:14 +01:00
Alan Somers
1a6c9811e5 Various documentation improvements
See issue #389 for some related discussions.
2019-04-06 17:37:01 +01:00
Peter Lemenkov
4ebf27a4e8 Whitelist smb2 (#392)
See also https://bugzilla.redhat.com/1694552#c7
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
2019-04-03 21:43:48 +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
maxice8
b1b06d1920 Define ALLPERMS for musl libc systems. (#379) 2019-03-11 17:32:45 +00:00
Alan Somers
064fe96561 Improve documentation for the flush method (#378)
Fixes: #373
2019-03-10 19:35:30 +00:00
Nikolaus Rath
16337224ea Released 3.4.2 2019-03-09 11:16:00 +00:00
Chad Austin
fd0ed8290e Improve readdir() and file handle documentation
Fixes: #333
2019-03-09 11:02:24 +00:00
1c7718e7
9e6cdc2c0c Add HFS+ to filesystem whitelist (#347) 2019-03-09 10:39:32 +00:00
Tomohiro Kusumi
b394699a66 Work around -Wformat-truncation=/-Wformat-overflow= warnings (#356)
sprintf(3)/snprintf(3) destination buffers need to be large enough
so that gcc doesn't warn -Wformat-truncation= or -Wformat-overflow=
when source buffer size is 1024 bytes.

--
../test/test_syscalls.c:1445:47: warning: '%s' directive output may be truncated writing 1 byte into a region of size between 0 and 1023 [-Wformat-truncation=]
 #define PATH(p)  (snprintf(path, sizeof path, "%s/%s", testdir, p), path)
                                               ^~~~~~~
../test/test_syscalls.c:1458:19:
  res = mkdir(PATH("a"), 0755);
                   ~~~

Signed-off-by: Tomohiro Kusumi <kusumi.tomohiro@gmail.com>
2019-03-09 10:39:02 +00:00
Nikolaus Rath
1c70c870fe Correctly include config.h ("" vs <>)
This isn't a system header.

Fixes: #349
2019-03-09 10:31:18 +00:00
Alan Somers
078c623703 Fix the changelog entry for protocol version 7.12 (#374)
Commit 24b35c3d97 had a simple mistake in
its changelog entry.
2019-03-09 09:50:22 +00:00
Sam Huffman
774eb66fc1 fusermount: drop privileges for chdir()
cd to mountpoint's parent directory using unprivileged rather than 
privileged access. This is to ensure that unmount works on mountpoints
where root may not have privileged access.

Fixes: #376
2019-03-08 21:26:31 +00:00
Alan Somers
1b7d2b8862 Document fuse_fsync_in.fsync_flags and remove magic numbers (#375) 2019-03-08 21:24:50 +00:00
HazelFZ
06a31dece0 Link against libiconv when possible (#372) 2019-03-04 09:43:22 +00:00
Nikolaus Rath
86ebe1d2df Travis CI: Use Xenial instead of Trusty. 2019-02-27 21:20:58 +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
Albert Chen
276728f70f fuse_free_buf(): to check flags of each buffer, rather than only 0th
Fixes: #360
2019-02-13 09:42:15 +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