636 Commits

Author SHA1 Message Date
Daniel J Walsh
dd7cf03497
Merge pull request #168 from giuseppe/drop-O_DIRECT
main: reset O_DIRECT on open
2020-01-14 10:15:22 -05:00
Giuseppe Scrivano
724ab6d2b3
main: reset O_DIRECT on open
having the fd open with O_DIRECT causes pwrite64 to fail with EINVAL
if the write buffer is not aligned.  Since we have no control on the
buffer provided by libfuse, just drop O_DIRECT.

Closes: https://github.com/containers/fuse-overlayfs/issues/167

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-01-14 12:28:54 +01:00
Giuseppe Scrivano
ffc83a4ed6
main: specify FUSE_BUF_FD_RETRY to libfuse
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-01-14 12:27:17 +01:00
Giuseppe Scrivano
dfea3f9b63
main: fix fallocate for deleted files
allow to use fallocate on an unlinked path if there is still a
reference to it.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-01-13 22:24:34 +01:00
Giuseppe Scrivano
e01ba30da5
Merge pull request #165 from giuseppe/tag-0.7.3
configure.ac: tag 0.7.3
v0.7.3
2020-01-09 12:06:17 +01:00
Giuseppe Scrivano
54ad06bafe
configure.ac: tag 0.7.3
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-01-09 11:57:21 +01:00
Daniel J Walsh
a0ba68151a
Merge pull request #164 from giuseppe/fix-160
main: force a dir reload after a move
2020-01-08 12:20:29 -05:00
Giuseppe Scrivano
9f27377e13
Merge pull request #163 from saschagrunert/segfault
Fix possible segmentation fault in direct_fsync()
2020-01-08 13:25:41 +01:00
Giuseppe Scrivano
a9c49ec18d
main: create_missing_whiteouts uses datastore
refactor create_missing_whiteouts to use the datastore API so it works
correctly with plugins.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-01-08 13:24:00 +01:00
Giuseppe Scrivano
efcfb045b4
main: skip whiteouts file when creating missing ones
do not attempt to create a whiteout if the file itself is already a
whiteout.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-01-08 13:23:16 +01:00
Giuseppe Scrivano
b29a8f1587
main: force a dir reload after a move
if the directory was moved, invalidate its cache and force a reload.

Closes: https://github.com/containers/fuse-overlayfs/issues/160

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-01-08 13:22:20 +01:00
Giuseppe Scrivano
a6f9e32639
Merge pull request #161 from saschagrunert/extern
Fix build with -fno-common
2020-01-08 10:46:53 +01:00
Giuseppe Scrivano
7a06acbfda
Merge pull request #162 from saschagrunert/fixes
Fix dead increment and assignments
2020-01-08 10:46:16 +01:00
Sascha Grunert
0aa0537459
Fix possible segmentation fault in direct_fsync()
If the call to `get_upper_layer(lo)` returns `NULL` then the
`node->layer` will be `NULL`, too. If this is the case we pass `NULL` to
`direct_fsync()` which will cause a segmentation fault in:

```c
cfd = openat(l->fd, path, O_NOFOLLOW|O_DIRECTORY);
```

To fix this we now apply an additional check and error in the case of
`get_upper_layer(lo) == NULL`.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2020-01-08 09:33:48 +01:00
Sascha Grunert
07627d4ddb
Fix dead assignment in main.c
Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2020-01-08 09:23:42 +01:00
Sascha Grunert
8f3a1dde24
Fix dead increment in main.c
Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2020-01-08 09:22:22 +01:00
Sascha Grunert
54042dad32
Fix dead increment in utils.c
Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2020-01-08 09:19:50 +01:00
Sascha Grunert
ae73314491
Fix build with -fno-common
To avoid that the compiler complains when building with `-fno-common`.
Can be reproduced by:

```
> make CFLAGS=-fno-common
...
ld: fuse_overlayfs-direct.o:(.data+0x0): multiple definition of \
    `direct_access_ds'; fuse_overlayfs-main.o:(.bss+0x0): \
    first defined here
ld: fuse_overlayfs-utils.o:(.bss+0x0): multiple definition of \
    `direct_access_ds'; fuse_overlayfs-main.o:(.bss+0x0): \
    first defined here
ld: fuse_overlayfs-plugin-manager.o:(.bss+0x0): multiple definition of \
    `direct_access_ds'; fuse_overlayfs-main.o:(.bss+0x0): \
    first defined here
```

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2020-01-08 09:08:16 +01:00
Giuseppe Scrivano
53c17dab78
Merge pull request #156 from leorochael/simpler-static-build
Simpler static build
2019-12-11 16:31:43 +01:00
Leonardo Rochael Almeida
1956d59152 Rename static dockerfiles to reflect their distros 2019-12-09 15:09:23 -03:00
Daniel J Walsh
b5dfac4f75
Merge pull request #158 from giuseppe/clang-fixes
fuse-overlayfs: fix some warnings reported by clang
2019-12-09 10:48:26 -05:00
Giuseppe Scrivano
884052db48
build: fix compiler warnings found by gcc
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-12-09 14:49:34 +01:00
Giuseppe Scrivano
1d7b99d95a
fuse-overlayfs: fix some warnings reported by clang
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-12-09 11:05:47 +01:00
Leonardo Rochael Almeida
d6f7ae40b6 Simpler static build
Use an ubuntu image to obtain a static libfuse without compiling.

Remove the need for sharing /dev/fuse with the build container.

Simpler build instructions.
2019-12-06 17:02:51 -03:00
Daniel J Walsh
f6cbfc6489
Merge pull request #155 from giuseppe/include-headers-tarball
Makefile.am: include header files
2019-12-02 23:38:04 -05:00
Giuseppe Scrivano
add39c6183
Makefile.am: include header files
make sure the header files are included in the tarball generated by
"make dist".

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-12-02 22:18:27 +01:00
Giuseppe Scrivano
8c59873b00
configure: tag 0.7.2
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
v0.7.2
2019-11-29 14:16:32 +01:00
Daniel J Walsh
fe47dba184
Merge pull request #153 from giuseppe/drop-security-capability-handling
main: drop special handling for security.capability
2019-11-29 07:24:15 -05:00
Giuseppe Scrivano
5d053201d1
main: drop special handling for security.capability
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-11-29 11:53:49 +01:00
Giuseppe Scrivano
e0d2ffa382
configure: tag 0.7.1
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
v0.7.1
2019-11-28 17:12:05 +01:00
Daniel J Walsh
fc688fb65b
Merge pull request #150 from giuseppe/fix-musl-build-again
.travis: test build on Alpine
2019-11-28 06:55:38 -05:00
Daniel J Walsh
9e5b0aa29f
Merge pull request #152 from giuseppe/fix-parent-whiteout
main: prevent parent whiteout to hide file
2019-11-28 06:55:19 -05:00
Giuseppe Scrivano
dfd9f18773
main: prevent parent whiteout to hide file
use the full relative path when looking up the whiteout file,
otherwise a whiteout in the upper layer will hide files in
subdirectories.

Closes: https://github.com/containers/fuse-overlayfs/issues/151

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-11-27 21:03:21 +01:00
Giuseppe Scrivano
e280f411f1
.travis: test build on Alpine
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-11-27 14:34:27 +01:00
Giuseppe Scrivano
675b7b90e7
Merge pull request #149 from nanosapp/feature/fix-build-muslc
muslc: Fix build
2019-11-27 12:32:33 +01:00
Denys Vitali
1ecf46f58f
muslc: Fix build 2019-11-27 11:34:06 +01:00
Daniel J Walsh
b57e5c8d00
Merge pull request #147 from giuseppe/fix-build-musl
build: fix build on musl
2019-11-26 05:46:12 -05:00
Daniel J Walsh
58101db1b0
Merge pull request #146 from giuseppe/check-fuse-copy_file_range
configure: check for FUSE copy_file_range
2019-11-18 11:10:31 -05:00
Giuseppe Scrivano
d1f318ef73
build: fix build on musl
Closes: https://github.com/containers/fuse-overlayfs/issues/145

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-11-18 13:47:37 +01:00
Giuseppe Scrivano
d077ea28e3
configure: check for FUSE copy_file_range
check if the version of FUSE supports copy_file_range.

It fixes the build on RHEL 8.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-11-18 13:41:51 +01:00
Daniel J Walsh
34794cf17f
Merge pull request #144 from giuseppe/add-test
tests: test that touch -h works
2019-11-16 11:44:35 -05:00
Nalin Dahyabhai
5b4989a869 tests: test that touch -h works
verify that setting attributes on a dangling symlink work, even if the
file type is different on a lower layer.

Closes: https://github.com/containers/fuse-overlayfs/issues/143

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-11-15 18:02:35 -05:00
Giuseppe Scrivano
b3b67651d3
release: tag 0.7
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
v0.7
2019-11-05 08:39:30 +01:00
Daniel J Walsh
5f028d2349
Merge pull request #139 from giuseppe/fix-whiteout
main: honor opaque whiteout
2019-11-04 12:20:09 -05:00
Giuseppe Scrivano
2403cd9537
main: honor opaque whiteout
Closes: https://github.com/containers/fuse-overlayfs/issues/138

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-11-04 08:36:37 +01:00
Giuseppe Scrivano
35ef75d9b0
main, mkdir: set directory opaque
when creating a directory, set it opaque.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-11-02 19:46:51 +01:00
Daniel J Walsh
fa0cd999c8
Merge pull request #119 from giuseppe/c-plugins
fuse-overlayfs: add C plugins system
2019-10-31 16:28:19 -04:00
Giuseppe Scrivano
042846de50
main: correctly mark the last_layer with a deleted directory
Closes: https://github.com/containers/fuse-overlayfs/issues/136

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-10-31 14:26:15 +01:00
Giuseppe Scrivano
715a95c39d
plugins: load from default location
if no -o plugins is specified, load them from $PKGLIBEXECDIR (usually
has the value /usr/libexec/fuse-overlayfs).

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-10-25 11:02:17 +02:00
Giuseppe Scrivano
3fa10346c3
main: drop magic numbers
use EXIT_FAILURE and EXIT_SUCCESS instead.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-10-24 13:52:35 +02:00