Giuseppe Scrivano
241fecf92b
main: disable fsync for lower layers
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-07-22 12:34:25 +02:00
Giuseppe Scrivano
d092552b76
main: make ioctl parallel
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-07-22 12:34:24 +02:00
Giuseppe Scrivano
7f6fec26f4
main: make statfs parallel
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-07-22 12:34:23 +02:00
Giuseppe Scrivano
fa131919da
main: run read in parallel
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-07-22 12:34:22 +02:00
Giuseppe Scrivano
2f6eadd8d8
main: run write in parallel
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-07-22 12:34:22 +02:00
Giuseppe Scrivano
eb509974ef
main: run fsync in parallel
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-07-22 12:34:21 +02:00
Giuseppe Scrivano
733e75d42b
main: enable multithreading loop
...
this is a preparation patch. Use a big lock to protect every ovl_*
function.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-07-22 12:34:20 +02:00
Giuseppe Scrivano
87cd8f34fa
main: precompute name hash
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-07-22 12:14:46 +02:00
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
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
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
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
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
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
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
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
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
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
Jonathan Calmels
bff9fd9e22
fuse-overlayfs: change ovl_statfs to use the upper layer fd instead of its path
...
Signed-off-by: Jonathan Calmels <jcalmels@nvidia.com>
2019-04-11 16:42:29 -07:00
Jonathan Calmels
d371739254
fuse-overlayfs: skip opaque whiteouts on unsupported filesystems (e.g. tmpfs)
...
Signed-off-by: Jonathan Calmels <jcalmels@nvidia.com>
2019-04-11 16:40:22 -07:00
Giuseppe Scrivano
e108eee92c
fuse-overlayfs: write uses SPLICE_MOVE|SPLICE_NONBLOCK
...
don't block on writing to the pipe. It has a significant impact on
the performance.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-04-08 22:12:07 +02:00
Giuseppe Scrivano
e4f219a14d
ioctl: return immediately with not implemented ioctls
...
avoid to send an error response twice.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-04-04 22:21:05 +02:00
Giuseppe Scrivano
1f04143cdc
fuse-overlayfs: support some ioctls
...
Closes: https://github.com/containers/fuse-overlayfs/issues/59
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-04-03 17:58:36 +02:00
Giuseppe Scrivano
65e504cda8
copyup: use sendfile(2) if available
...
attempt to use sendfile(2) before falling back to a read/write loop.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-04-03 14:52:47 +02:00
Giuseppe Scrivano
844766d667
main: copyup uses reflinks if possible
...
Use reflinks if they are supported by the underlying file system.
On my system, using XFS and reflinks, chowning recursively a directory
passed from:
User time (seconds): 0.02
System time (seconds): 0.34
Percent of CPU this job got: 8%
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:04.52
to:
User time (seconds): 0.02
System time (seconds): 0.22
Percent of CPU this job got: 17%
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:01.45
the performance improvement can be higher if the directory is made of
few but bigger files.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-04-02 10:19:22 +02:00
Giuseppe Scrivano
ba05f2e351
main: print configuration settings only with --debug
...
Closes: https://github.com/containers/fuse-overlayfs/issues/57
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-03-29 10:23:15 +01:00
Giuseppe Scrivano
a6958ce78f
Merge pull request #56 from giuseppe/uid-mapping-docs
...
docs: document the uid/gid mapping
2019-03-28 17:18:40 +01:00
Giuseppe Scrivano
0f52165ae6
fuse-overlayfs: do not hardcode overflow ids
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-03-28 09:47:39 +01:00
Giuseppe Scrivano
3a921aa5d7
fuse-overlayfs: fix first unlink done
...
fix a regression introduced by f64f65287817fecd0 that prevents a
whiteout file to be created on the first unlink.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-03-27 21:26:45 +01:00
Giuseppe Scrivano
8ec68aee52
Merge pull request #53 from giuseppe/fix-lookup-if-whiteout-lower-layer
...
fuse-overlayfs: fix lookup with multiple layers
2019-03-08 20:06:27 +01:00
Giuseppe Scrivano
44d23bc07e
fuse-overlayfs: fix lookup with multiple layers
...
when looking up multiple layers and we have already found a file, do
not check if whiteouts are present in lower layers. The lookup in the
lower layers is needed only to correctly propagate the inode number.
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1686889
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-03-08 18:13:55 +01:00
Giuseppe Scrivano
f17f15a48b
build: provide replacement for TEMP_FAILURE_RETRY if not present
...
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-03-07 10:22:26 +01:00