238 Commits

Author SHA1 Message Date
Giuseppe Scrivano
c95961d9cc
main: pack ovl_node
remove holes reported by pahole.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-07-22 12:14:45 +02:00
Giuseppe Scrivano
afbb9049da
main: check immediately if mknod is usable
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-07-22 12:14:45 +02:00
Giuseppe Scrivano
8d2aedcb19
main: skip deleting dev whiteouts when unprivileged
do not attempt to delete device whiteouts when the process has not
enough privileges to create them.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-07-22 12:14:44 +02:00
Giuseppe Scrivano
c2aab54c83
main: avoid a stat when doing a chown()
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-07-22 12:14:43 +02:00
Giuseppe Scrivano
5239adf755
main: add new function to concatenate strings
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-07-22 12:14:42 +02:00
Giuseppe Scrivano
d9c5215e33
main: avoid a stat when possible
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-07-14 00:10:51 +02:00
Giuseppe Scrivano
4056a2a84a
main: use faccessat instead of fstatat when possible
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-07-14 00:10:50 +02:00
Giuseppe Scrivano
3294c8cc51
main: use static buffers for paths
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-07-13 21:50:04 +02:00
Giuseppe Scrivano
809532a58a
perf: enable parallel dirops
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-07-13 12:24:29 +02:00
Giuseppe Scrivano
7bc2dd978e
Merge pull request #87 from giuseppe/revert-upperdirfd
Revert "main: add helper function to get fd to the upper layer"
2019-06-21 14:28:54 +02:00
Giuseppe Scrivano
aa9907c278
configure.ac: tag 0.4.2
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-06-21 10:07:40 +02:00
Giuseppe Scrivano
9adc80c31b
Revert "main: add helper function to get fd to the upper layer"
This reverts commit b4ef7a8fff0a76ac05dccb59edbbb49971b76420.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-06-21 10:07:39 +02:00
Daniel J Walsh
1ff7c64d2f
Merge pull request #85 from giuseppe/fix-rm
rm: fix rm'ing a file
v0.4.1
2019-06-13 08:45:44 -04:00
Giuseppe Scrivano
ceba2dd67b
configure.ac: tag 0.4.1
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-06-12 21:17:09 +02:00
Giuseppe Scrivano
e9f5f04883
rm: fix regression when deleting a file
fix a regression caused by 7dcef0769b1521b8f14bdee58339c26140466c85

Closes: https://bodhi.fedoraproject.org/updates/FEDORA-2019-fff1ded16e#comment-958825

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-06-12 21:17:09 +02:00
Mrunal Patel
8d92da63a9
Merge pull request #84 from giuseppe/tag-0.4
configure.ac: tag new release
v0.4
2019-06-06 12:38:30 -07:00
Giuseppe Scrivano
830a9d60ef
configure.ac: tag new release
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-06-06 15:43:48 +02:00
Daniel J Walsh
25c98c375e
Merge pull request #83 from giuseppe/timeout
fuse-overlayfs: add new option "timeout"
2019-06-06 06:16:52 +02:00
Giuseppe Scrivano
7e59e3ba08
fuse-overlayfs: add new option "timeout"
allow to override the default timeout value we specify for an entry
validity.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-06-05 00:25:56 +02:00
Daniel J Walsh
e32f71698a
Merge pull request #82 from giuseppe/fix-flock-hang
main: drop code to handle flock
2019-06-04 07:44:48 +02:00
Daniel J Walsh
b10963d1f7
Merge pull request #81 from giuseppe/fix-warning
main: fix compiler warning
2019-06-04 06:56:23 +02:00
Giuseppe Scrivano
b43ed1b391
main: drop code to handle flock
the implementation of flock(2) was wrong and it caused a deadlock when
multiple processes tried to lock the same file.

Drop it and let FUSE handle locking for us.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-06-03 15:14:20 +02:00
Giuseppe Scrivano
7374427d33
main: fix compiler warning
fix this warning:

main.c:3870:13: warning: initialization of ‘void (*)(struct fuse_req
 *, fuse_ino_t,  unsigned int,  void *, struct fuse_file_info *,
 unsigned int,  const void *, size_t,  size_t)’ {aka ‘void (*)(struct
 fuse_req *, long unsigned int,  unsigned int,  void *, struct
 fuse_file_info *, unsigned int,  const void *, long unsigned int,
 long unsigned int)’} from incompatible pointer type ‘void (*)(struct
 fuse_req *, fuse_ino_t,  long unsigned int,  void *, struct
 fuse_file_info *, unsigned int,  const void *, size_t,  size_t)’ {aka
 ‘void (*)(struct fuse_req *, long unsigned int,  long unsigned int,
 void *, struct fuse_file_info *, unsigned int,  const void *, long
 unsigned int,  long unsigned int)’} [-Wincompatible-pointer-types]

 3870 |    .ioctl = ovl_ioctl,
      |             ^~~~~~~~~

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-06-03 14:37:58 +02:00
Daniel J Walsh
2cbd1c4a2d
Merge pull request #78 from giuseppe/cleanups
fuse-overlayfs: some cleanups
2019-05-25 06:32:12 -04:00
Giuseppe Scrivano
b4ef7a8fff
main: add helper function to get fd to the upper layer
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-05-24 17:21:53 +02:00
Giuseppe Scrivano
7dcef0769b
rename: create whiteout before doing the renameat
so we don't uncover files from the lower layers if the whiteout cannot
be created.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-05-24 14:26:59 +02:00
Giuseppe Scrivano
6c74e33cca
main: do not open twice the same file
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-05-24 12:58:31 +02:00
Giuseppe Scrivano
a468981104
main.c: fix typo
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-05-24 12:00:15 +02:00
Daniel J Walsh
a7c8295806
Merge pull request #77 from giuseppe/enable-containers-storage-tests
travis: enable containers/storage tests
2019-05-16 16:00:10 -04:00
Giuseppe Scrivano
e1ffd68d82
travis: enable containers/storage tests
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-05-16 15:17:04 +02:00
Giuseppe Scrivano
1bf811f672
travis: run unionfs tests in a new mount namespace
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-05-16 11:46:38 +02:00
Giuseppe Scrivano
891ba88f23
travis: early terminate if tests fail
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-05-16 11:35:03 +02:00
Giuseppe Scrivano
fbe708ac4f
travis: update to xenial
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-05-16 11:08:09 +02:00
Daniel J Walsh
d4c83490f0
Merge pull request #76 from giuseppe/fix-lookup-whiteout-component
main: skip ENOTDIR in a lookup
2019-05-15 13:01:01 -04:00
Giuseppe Scrivano
3732249217
main: skip ENOTDIR in a lookup
if we are looking for a path in a lower component, skip ENOTDIR as a
component might be a whiteout.

This happens only when running as root, as the whiteout takes the same
name of the deleted file/directory.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-05-15 17:08:16 +02:00
Daniel J Walsh
7b805b0dac
Merge pull request #72 from sVattic/patch-1
Update static build instructions
2019-05-13 09:13:04 -04:00
Susan Vattic
41d27d3acc
Update Dockerfile.static 2019-05-13 07:50:56 -05:00
Susan Vattic
3c2c9ba339
Update README.md 2019-05-11 14:49:19 -05:00
Susan Vattic
1c7991fb07
Update Dockerfile.static 2019-05-11 14:46:25 -05:00
Giuseppe Scrivano
89bd69ba91
Merge pull request #70 from thiell/sendfile-minorfix
copyup: minor fixes for sendfile()
2019-05-06 14:51:05 +02:00
Stephane Thiell
a558c9ab3c copyup: minor fixes for sendfile() 2019-05-05 20:27:03 -07:00
Daniel J Walsh
9f193e9f69
Merge pull request #71 from giuseppe/no-copyup-whiteout
fuse-overlayfs: do not copyup a whiteout on rename
2019-05-03 09:09:17 -04:00
Giuseppe Scrivano
02dcd8a3e1
fuse-overlayfs: do not copyup a whiteout on rename
Closes: https://github.com/containers/fuse-overlayfs/issues/69

Signed-off-by: Giuseppe Scrivano <giuseppe@scrivano.org>
2019-05-03 13:02:16 +02:00
Daniel J Walsh
cdd706782f
Merge pull request #68 from giuseppe/fix-opaque-whiteout
fuse-overlayfs: add support for .wh..wh..opq variant
2019-04-28 06:10:12 -04:00
Giuseppe Scrivano
480d27ff3a
fuse-overlayfs: fix error messages prefix
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-04-27 10:13:22 +02:00
Giuseppe Scrivano
29877f7edf
fuse-overlayfs: create opaque whiteout file for dirs
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-04-27 10:13:21 +02:00
Giuseppe Scrivano
064452bfba
fuse-overlayfs: not override the ret from fstatat
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-04-27 00:19:26 +02:00
Giuseppe Scrivano
eee6a48738
fuse-overlayfs: support opaque whiteouts
Support the .wh..wh..opq variant.

Closes: https://github.com/containers/libpod/issues/3021

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-04-27 00:19:25 +02:00
Giuseppe Scrivano
69165c8a84
Merge pull request #66 from 3XX0/opaque-xattr-notsup
fuse-overlayfs: skip opaque whiteouts on unsupported filesystems (e.g…
2019-04-12 10:16:22 +02:00
Giuseppe Scrivano
b1c612984e
Merge pull request #65 from 3XX0/statfs-upper-fd
fuse-overlayfs: change ovl_statfs to use the upper layer fd instead o…
2019-04-12 10:15:53 +02:00