From 0d8c5480d15d3e0f421098a518bf98909a7cd50f Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Wed, 30 Nov 2022 15:46:04 +0100 Subject: [PATCH 1/5] main: report the st_ino known so far Signed-off-by: Giuseppe Scrivano --- main.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index af05f57..12464e0 100644 --- a/main.c +++ b/main.c @@ -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_dev = node->tmp_dev; - if (ret == 0 && node_dirp (node)) + + if (node_dirp (node)) { 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 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; } From 36b482bf52e9fb64fd87bcd25c8061e6b0c2dcc9 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Wed, 30 Nov 2022 15:49:46 +0100 Subject: [PATCH 2/5] main: invalidate inode after unlink Signed-off-by: Giuseppe Scrivano --- main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/main.c b/main.c index 12464e0..004acea 100644 --- a/main.c +++ b/main.c @@ -3406,6 +3406,7 @@ do_rm (fuse_req_t req, fuse_ino_t parent, const char *name, bool dirp) node_set_name (&key, (char *) name); rm = hash_delete (pnode->children, &key); + fuse_lowlevel_notify_inval_inode (lo->se, node_to_inode (node), -1, 0); if (rm) { ret = hide_node (lo, rm, true); From 34d47e9a7424e19630ca8e932aa05b83083471e0 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Wed, 30 Nov 2022 16:29:43 +0100 Subject: [PATCH 3/5] main: pick node version that is loaded Signed-off-by: Giuseppe Scrivano --- main.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index 004acea..2f23be6 100644 --- a/main.c +++ b/main.c @@ -2048,7 +2048,13 @@ do_lookup_file (struct ovl_data *lo, fuse_ino_t parent, const char *name) pnode = inode_to_node (lo, parent); if (name == NULL) - return pnode; + { + /* Prefer a version that is loaded. */ + for (node = pnode; node; node = node->next_link) + if (node->parent) + return node; + return pnode; + } if (has_prefix (name, ".wh.")) { From a1e8466e2c2b46593656481508c1cf65a853e4bd Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Wed, 30 Nov 2022 16:32:48 +0100 Subject: [PATCH 4/5] NEWS: tag 1.10 Closes: https://github.com/containers/fuse-overlayfs/issues/380 Signed-off-by: Giuseppe Scrivano --- NEWS | 9 +++++++++ configure.ac | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index d6ddb26..23cc912 100644 --- a/NEWS +++ b/NEWS @@ -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 - main: fix setting attributes on file without permissions. diff --git a/configure.ac b/configure.ac index 9b3ea19..129ded0 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ AC_PREREQ([2.69]) -AC_INIT([fuse-overlayfs], [1.10-dev], [giuseppe@scrivano.org]) +AC_INIT([fuse-overlayfs], [1.10], [giuseppe@scrivano.org]) AC_CONFIG_SRCDIR([main.c]) AC_CONFIG_HEADERS([config.h]) From b4a61def5f8bd1070851867d40f6aa96158e07e3 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Wed, 30 Nov 2022 16:33:00 +0100 Subject: [PATCH 5/5] configure.ac: back to dev Signed-off-by: Giuseppe Scrivano --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 129ded0..7294042 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ AC_PREREQ([2.69]) -AC_INIT([fuse-overlayfs], [1.10], [giuseppe@scrivano.org]) +AC_INIT([fuse-overlayfs], [1.11-dev], [giuseppe@scrivano.org]) AC_CONFIG_SRCDIR([main.c]) AC_CONFIG_HEADERS([config.h])