Merge pull request #381 from giuseppe/tag-1.10

NEWS: tag 1.10
This commit is contained in:
Daniel J Walsh 2022-11-30 10:49:55 -05:00 committed by GitHub
commit 25db5be78a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 28 additions and 3 deletions

9
NEWS
View File

@ -1,3 +1,12 @@
* fuse-overlayfs-1.10
- main: use /proc/self/fd to read xattrs.
- main: inherit ACLs for new files/dirs.
- main: fix passing noatime.
- main: add checks for valid /proc mount.
- main: fix copy_file_range for deleted files.
- main: fix creating links of just deleted files.
* fuse-overlayfs-1.9 * fuse-overlayfs-1.9
- main: fix setting attributes on file without permissions. - main: fix setting attributes on file without permissions.

View File

@ -1,5 +1,5 @@
AC_PREREQ([2.69]) AC_PREREQ([2.69])
AC_INIT([fuse-overlayfs], [1.10-dev], [giuseppe@scrivano.org]) AC_INIT([fuse-overlayfs], [1.11-dev], [giuseppe@scrivano.org])
AC_CONFIG_SRCDIR([main.c]) AC_CONFIG_SRCDIR([main.c])
AC_CONFIG_HEADERS([config.h]) AC_CONFIG_HEADERS([config.h])

18
main.c
View File

@ -944,7 +944,8 @@ rpl_stat (fuse_req_t req, struct ovl_node *node, int fd, const char *path, struc
st->st_ino = node->tmp_ino; st->st_ino = node->tmp_ino;
st->st_dev = node->tmp_dev; st->st_dev = node->tmp_dev;
if (ret == 0 && node_dirp (node))
if (node_dirp (node))
{ {
if (!data->static_nlink) if (!data->static_nlink)
{ {
@ -961,6 +962,14 @@ rpl_stat (fuse_req_t req, struct ovl_node *node, int fd, const char *path, struc
else else
st->st_nlink = 1; st->st_nlink = 1;
} }
else
{
struct ovl_node *n;
st->st_nlink = 0;
for (n = node->ino->node; n; n = n->next_link)
st->st_nlink++;
}
return ret; return ret;
} }
@ -2039,7 +2048,13 @@ do_lookup_file (struct ovl_data *lo, fuse_ino_t parent, const char *name)
pnode = inode_to_node (lo, parent); pnode = inode_to_node (lo, parent);
if (name == NULL) if (name == NULL)
{
/* Prefer a version that is loaded. */
for (node = pnode; node; node = node->next_link)
if (node->parent)
return node;
return pnode; return pnode;
}
if (has_prefix (name, ".wh.")) if (has_prefix (name, ".wh."))
{ {
@ -3397,6 +3412,7 @@ do_rm (fuse_req_t req, fuse_ino_t parent, const char *name, bool dirp)
node_set_name (&key, (char *) name); node_set_name (&key, (char *) name);
rm = hash_delete (pnode->children, &key); rm = hash_delete (pnode->children, &key);
fuse_lowlevel_notify_inval_inode (lo->se, node_to_inode (node), -1, 0);
if (rm) if (rm)
{ {
ret = hide_node (lo, rm, true); ret = hide_node (lo, rm, true);