68 Commits

Author SHA1 Message Date
Giuseppe Scrivano
d55cd97b73
fuse-overlayfs: propagate errors from readdir(3)
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-15 19:30:49 +02:00
Giuseppe Scrivano
cc18f5ce18
fuse-overlayfs: rename uses a .wh. style whiteout
during a rename, use a .wh. style whiteout for the destination, so
that if the rename fails we don't make visible files from the lower
layers.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-15 16:30:04 +02:00
Giuseppe Scrivano
e908a68156
fuse-overlayfs: remove duplicate variable in ovl_rename_direct
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-15 14:43:21 +02:00
Giuseppe Scrivano
b3f454183f
fuse-overlayfs: split ovl_rename in two functions
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-15 14:30:26 +02:00
Giuseppe Scrivano
234a1baaf9
rpm: drop multiple listed dependencies
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-13 15:17:24 +02:00
Giuseppe Scrivano
04be2fced2
fuse-overlayfs: error out if redirect_dir is specified
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-13 14:15:03 +02:00
Giuseppe Scrivano
8b54d466e1
fuse-overlayfs: name the xattr origin not redirect
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-13 12:54:09 +02:00
Giuseppe Scrivano
358873e18b
fuse-overlayfs: do not allow to overwrite user.fuseoverlayfs xattrs
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-13 12:42:49 +02:00
Giuseppe Scrivano
6e7b5d70fd
fuse-overlayfs: reload the dir before checking for EXDEV
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-13 00:03:34 +02:00
Giuseppe Scrivano
e0ba188721
fuse-overlayfs: fix xattrs
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-13 00:03:34 +02:00
Giuseppe Scrivano
85d1a08cf2
fuse-overlayfs: support also mv to empty directory with whiteouts
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-13 00:03:34 +02:00
Giuseppe Scrivano
0cc1b77696
fuse-overlayfs: hide directories recursively on a rename
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-13 00:03:34 +02:00
Giuseppe Scrivano
b054b9a191
fuse-overlayfs: allow copy of a dir over an existing in the lower layers
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-13 00:03:34 +02:00
Giuseppe Scrivano
86f98b4c91
fuse-overlays: do not uncover removed directories from lower dirs
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-13 00:03:34 +02:00
Giuseppe Scrivano
f58a9c452e
fuse-overlayfs: skip whiteouts when comparing hardlinks during a rename
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-13 00:03:34 +02:00
Giuseppe Scrivano
382b0d8e0c
fuse-overlayfs: create hard link in the workdir first
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-13 00:03:34 +02:00
Giuseppe Scrivano
c851b9bfda
fuse-overlayfs: stop lookup on the first file found
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-13 00:03:34 +02:00
Giuseppe Scrivano
81ecc7ea77
fuse-overlayfs: check if it is a whiteout before raising EEXIST
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-13 00:03:34 +02:00
Giuseppe Scrivano
9c5acf4bf2
fuse-overlayfs: attempt to delete node whiteout first
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-13 00:03:34 +02:00
Giuseppe Scrivano
4d34e45e37
fuse-overlayfs: implement mknod
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-13 00:03:34 +02:00
Giuseppe Scrivano
b8f90ec1f6
fuse-overlayfs: mkdir creates the directory in the workdir first
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-13 00:03:34 +02:00
Giuseppe Scrivano
996f297f9d
rmdir: catch ENOTEMPTY also when deleting a dir from a lower layer
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-13 00:03:34 +02:00
Giuseppe Scrivano
616119093a
fuse-overlayfs: use renameat2(RENAME_WHITEOUT) when possible
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-13 00:03:34 +02:00
Giuseppe Scrivano
81c939f350
fuse-overlayfs: attempt to create mknod whiteout before attempting the .wh. fallback
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-11 16:57:59 +02:00
Giuseppe Scrivano
0d02ef15ce
fuse-overlayfs: check if it is a whiteout also when doing a lookup
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-11 16:20:51 +02:00
Giuseppe Scrivano
dbf5732c75
fuse-overlayfs: refactor code to delete a whiteout
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-11 12:37:48 +02:00
Giuseppe Scrivano
4dd791a734
fuse-overlayfs: refactor code to create a whiteout
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-11 11:10:29 +02:00
Giuseppe Scrivano
d8e9ee1299
fuse-overlayfs: shift uid/gid from FUSE ctx
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-11 10:27:58 +02:00
Giuseppe Scrivano
3c4027da81
open: create the new file in the working directory first
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-11 10:12:01 +02:00
Giuseppe Scrivano
f16008d3a9
build: add missing files
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-10 17:06:23 +02:00
Giuseppe Scrivano
e030b7b8fd
lib: update
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-10 17:06:23 +02:00
Giuseppe Scrivano
24ee76fba1
configure: add AC_PROG_RANLIB
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-10 17:06:23 +02:00
Giuseppe Scrivano
8ba49ca75a
fuse-overlayfs: force default_permissions,allow_other
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-10 17:06:23 +02:00
Giuseppe Scrivano
b78f52f24b
fuse-overlayfs: on link(2) set the redirect link from the source
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-09 20:42:14 +02:00
Giuseppe Scrivano
5c3e2c330b
fuse-overlayfs: change cfs_ prefix again
as the project was renamed to fuse-overlayfs.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-09 20:20:38 +02:00
Giuseppe Scrivano
7afb2f6a76
fuse-overlayfs: change option names to uidmapping and gidmapping
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-09 18:25:09 +02:00
Giuseppe Scrivano
c8c9a4aa2c
rename to fuse-overlayfs
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-09 18:23:19 +02:00
Giuseppe Scrivano
4db566b76a
containerfs: retry syscalls that might be interrupted
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-09 14:23:50 +02:00
Giuseppe Scrivano
f7f9f8b44a
containerfs: change prefix lo_ to cfs_
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-09 12:05:19 +02:00
Giuseppe Scrivano
d7f52737d3
containerfs: fix fd leak
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-09 11:55:47 +02:00
Giuseppe Scrivano
003d569b74
containerfs: rename rmfrom to hidden_dirfd
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-09 10:48:19 +02:00
Giuseppe Scrivano
8dfeb42b06
containerfs: make low a bool
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-09 10:47:15 +02:00
Giuseppe Scrivano
4169157e92
containerfs: drop unused root_lower member
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-09 10:38:32 +02:00
Giuseppe Scrivano
63a803540a
containerfs: rename doesn't rm src if dest is the same file
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-07 18:24:38 +02:00
Giuseppe Scrivano
78d72baaa4
containerfs: use the workingdir to create a directory
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-06 12:40:57 +02:00
Giuseppe Scrivano
c820997ed6
containerfs: refactor xattr copy to a new function
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-06 11:33:48 +02:00
Giuseppe Scrivano
3b7a5a79af
containerfs: copyup uses a temporary file in the workingdir
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-06 11:28:18 +02:00
Giuseppe Scrivano
5ec6b893d3
build: add stuff for building an rpm
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-04 20:25:20 +02:00
Giuseppe Scrivano
b89b8ebf5d
containerfs: use an xattr to store redirects of a file
So we can correctly report the same issue for hard links.

Closes: https://github.com/giuseppe/containerfs/issues/1

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-04 16:02:32 +02:00
Giuseppe Scrivano
d63934d540
containerfs: copy xattrs on copyup
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-07-04 14:54:31 +02:00