8 Commits

Author SHA1 Message Date
Giuseppe Scrivano
f703870668
main: drop nlink optimization
calculate the nlink for the directory on each stat.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-03-16 11:54:39 +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
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
1c490d91d8
plugins: allow to manage multiple layers with a ds
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-10-24 13:52:34 +02:00
Giuseppe Scrivano
9f6f90a6da
direct: use statx when available
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-10-20 22:06:40 +02:00
Giuseppe Scrivano
b28a23a39d
fuse-overlayfs: add plugin system
Add a simple plugin mechanism that will help to expand fuse-overlayfs
functionalities, in particular it allows to load data from a layer on
demand.

A plugin is loaded into fuse-overlayfs using the option:

-o plugins=path/to/plugin.so:path/to/another/plugin.so

A layer can use a plugin with the syntax:

-o lowerdir=//plugin-name/DATA-FOR-THE-PLUGIN/path

Each time a file/directory is looked up, if a plugin is registered for
a layer, the plugin is first notified about the request.

After the callback is invoked, fuse-overlayfs still expects the data
to be accessible at the specified directory.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-10-20 22:06:39 +02:00
Giuseppe Scrivano
c2c2ac5b82
main: split the code in multiple files
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-10-20 19:44:20 +02:00
Giuseppe Scrivano
53c165e6bd
main: refactor to use a data store
this is the first step towards supporting data from lower layers
coming from other sources.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-10-20 19:44:20 +02:00