Compare commits

...

No commits in common. "c9-beta" and "c10s" have entirely different histories.

27 changed files with 358 additions and 839 deletions

1
.fmf/version Normal file
View File

@ -0,0 +1 @@
1

View File

@ -1 +0,0 @@
97e7affc42039ea8a98adc606278fb0593462c7e SOURCES/fuse-3.10.2.tar.gz

26
.gitignore vendored
View File

@ -1 +1,25 @@
SOURCES/fuse-3.10.2.tar.gz
/fuse-3.4.2.tar.gz
/fuse-3.5.0.tar.gz
/fuse-3.6.1.tar.gz
/fuse-3.6.2.tar.gz
/fuse-3.7.0.tar.gz
/fuse-3.8.0.tar.gz
/fuse-3.9.0.tar.gz
/fuse-3.9.1.tar.gz
/fuse-3.9.2.tar.gz
/fuse-3.9.4.tar.gz
/fuse-3.10.0.tar.gz
/fuse-3.10.1.tar.gz
/fuse-3.10.2.tar.gz
/fuse-3.10.3.tar.gz
/fuse-3.10.4.tar.gz
/fuse-3.10.5.tar.gz
/fuse-3.12.0.tar.gz
/fuse-3.13.0.tar.gz
/fuse-3.13.1.tar.gz
/fuse-3.14.0.tar.gz
/fuse-3.14.1.tar.gz
/fuse-3.16.1.tar.gz
/fuse-3.16.1.tar.gz.sig
/fuse-3.16.2.tar.gz
/fuse-3.16.2.tar.gz.sig

3
README.md Normal file
View File

@ -0,0 +1,3 @@
# fuse3
File System in Userspace (FUSE) v3 utilities

View File

@ -1,36 +0,0 @@
From 8852a22399b015c784b509308bc9dd25b65a539f Mon Sep 17 00:00:00 2001
From: Amir Goldstein <amir73il@gmail.com>
Date: Wed, 2 Jun 2021 12:23:06 +0300
Subject: [PATCH] test/test_syscalls.c: fix test failure on xfs src dir (#611)
rename dir loop test fails when test tmp dir is xfs with an error
test_rename_dir_loop() - rename : File exists
That is because xfs returns EEXIST for the case of renaming over
a non-empty directory.
According to rename(2) man page, EEXIST and ENOTEMPTY are both valid
error code in this case.
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Pavel Reichl <preichl@redhat.com>
---
test/test_syscalls.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/test_syscalls.c b/test/test_syscalls.c
index 4fa5c87..cd799ce 100644
--- a/test/test_syscalls.c
+++ b/test/test_syscalls.c
@@ -1624,7 +1624,7 @@ static int test_rename_dir_loop(void)
errno = 0;
res = rename(PATH("a/b"), PATH2("a/d"));
- if (res == 0 || errno != ENOTEMPTY) {
+ if (res == 0 || (errno != ENOTEMPTY && errno != EEXIST)) {
PERROR("rename");
goto fail;
}
--
2.35.1

View File

@ -1,197 +0,0 @@
From 4df08719f3415cde6f802a755922b7f76e198cd7 Mon Sep 17 00:00:00 2001
From: Dharmendra Singh <dsingh@ddn.com>
Date: Mon, 28 Feb 2022 11:15:06 +0000
Subject: [PATCH] Modify structures in libfuse to handle flags beyond 32 bits.
In fuse kernel, 'commit 53db28933e95 ("fuse: extend init flags")'
made the changes to handle flags going beyond 32 bits but i think
changes were not done in libfuse to handle the same.
This patch prepares the ground in libfuse for incoming FUSE kernel
patches (Atomic open + lookup) where flags went beyond 32 bits.
It makes struct same as in fuse kernel resulting in name change of
few fields.
Signed-off-by: Pavel Reichl <preichl@redhat.com>
---
include/fuse_kernel.h | 8 +++--
lib/fuse_lowlevel.c | 81 ++++++++++++++++++++++++-------------------
2 files changed, 51 insertions(+), 38 deletions(-)
diff --git a/include/fuse_kernel.h b/include/fuse_kernel.h
index 48f2000..4762c9e 100644
--- a/include/fuse_kernel.h
+++ b/include/fuse_kernel.h
@@ -303,6 +303,7 @@ struct fuse_file_lock {
#define FUSE_CACHE_SYMLINKS (1 << 23)
#define FUSE_NO_OPENDIR_SUPPORT (1 << 24)
#define FUSE_EXPLICIT_INVAL_DATA (1 << 25)
+#define FUSE_INIT_EXT (1 << 30)
/**
* CUSE INIT request/reply flags
@@ -639,6 +640,8 @@ struct fuse_init_in {
uint32_t minor;
uint32_t max_readahead;
uint32_t flags;
+ uint32_t flags2;
+ uint32_t unused[11];
};
#define FUSE_COMPAT_INIT_OUT_SIZE 8
@@ -654,8 +657,9 @@ struct fuse_init_out {
uint32_t max_write;
uint32_t time_gran;
uint16_t max_pages;
- uint16_t padding;
- uint32_t unused[8];
+ uint16_t map_alignment;
+ uint32_t flags2;
+ uint32_t unused[7];
};
#define CUSE_INIT_INFO_MAX 4096
diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c
index 3a1e7d8..1d75724 100644
--- a/lib/fuse_lowlevel.c
+++ b/lib/fuse_lowlevel.c
@@ -1906,7 +1906,8 @@ void do_init(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
struct fuse_session *se = req->se;
size_t bufsize = se->bufsize;
size_t outargsize = sizeof(outarg);
-
+ uint64_t inargflags = 0;
+ uint64_t outargflags = 0;
(void) nodeid;
if (se->debug) {
fuse_log(FUSE_LOG_DEBUG, "INIT: %u.%u\n", arg->major, arg->minor);
@@ -1941,43 +1942,46 @@ void do_init(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
if (arg->minor >= 6) {
if (arg->max_readahead < se->conn.max_readahead)
se->conn.max_readahead = arg->max_readahead;
- if (arg->flags & FUSE_ASYNC_READ)
+ inargflags = arg->flags;
+ if (inargflags & FUSE_INIT_EXT)
+ inargflags = inargflags | (uint64_t) arg->flags2 << 32;
+ if (inargflags & FUSE_ASYNC_READ)
se->conn.capable |= FUSE_CAP_ASYNC_READ;
- if (arg->flags & FUSE_POSIX_LOCKS)
+ if (inargflags & FUSE_POSIX_LOCKS)
se->conn.capable |= FUSE_CAP_POSIX_LOCKS;
- if (arg->flags & FUSE_ATOMIC_O_TRUNC)
+ if (inargflags & FUSE_ATOMIC_O_TRUNC)
se->conn.capable |= FUSE_CAP_ATOMIC_O_TRUNC;
- if (arg->flags & FUSE_EXPORT_SUPPORT)
+ if (inargflags & FUSE_EXPORT_SUPPORT)
se->conn.capable |= FUSE_CAP_EXPORT_SUPPORT;
- if (arg->flags & FUSE_DONT_MASK)
+ if (inargflags & FUSE_DONT_MASK)
se->conn.capable |= FUSE_CAP_DONT_MASK;
- if (arg->flags & FUSE_FLOCK_LOCKS)
+ if (inargflags & FUSE_FLOCK_LOCKS)
se->conn.capable |= FUSE_CAP_FLOCK_LOCKS;
- if (arg->flags & FUSE_AUTO_INVAL_DATA)
+ if (inargflags & FUSE_AUTO_INVAL_DATA)
se->conn.capable |= FUSE_CAP_AUTO_INVAL_DATA;
- if (arg->flags & FUSE_DO_READDIRPLUS)
+ if (inargflags & FUSE_DO_READDIRPLUS)
se->conn.capable |= FUSE_CAP_READDIRPLUS;
- if (arg->flags & FUSE_READDIRPLUS_AUTO)
+ if (inargflags & FUSE_READDIRPLUS_AUTO)
se->conn.capable |= FUSE_CAP_READDIRPLUS_AUTO;
- if (arg->flags & FUSE_ASYNC_DIO)
+ if (inargflags & FUSE_ASYNC_DIO)
se->conn.capable |= FUSE_CAP_ASYNC_DIO;
- if (arg->flags & FUSE_WRITEBACK_CACHE)
+ if (inargflags & FUSE_WRITEBACK_CACHE)
se->conn.capable |= FUSE_CAP_WRITEBACK_CACHE;
- if (arg->flags & FUSE_NO_OPEN_SUPPORT)
+ if (inargflags & FUSE_NO_OPEN_SUPPORT)
se->conn.capable |= FUSE_CAP_NO_OPEN_SUPPORT;
- if (arg->flags & FUSE_PARALLEL_DIROPS)
+ if (inargflags & FUSE_PARALLEL_DIROPS)
se->conn.capable |= FUSE_CAP_PARALLEL_DIROPS;
- if (arg->flags & FUSE_POSIX_ACL)
+ if (inargflags & FUSE_POSIX_ACL)
se->conn.capable |= FUSE_CAP_POSIX_ACL;
- if (arg->flags & FUSE_HANDLE_KILLPRIV)
+ if (inargflags & FUSE_HANDLE_KILLPRIV)
se->conn.capable |= FUSE_CAP_HANDLE_KILLPRIV;
- if (arg->flags & FUSE_CACHE_SYMLINKS)
+ if (inargflags & FUSE_CACHE_SYMLINKS)
se->conn.capable |= FUSE_CAP_CACHE_SYMLINKS;
- if (arg->flags & FUSE_NO_OPENDIR_SUPPORT)
+ if (inargflags & FUSE_NO_OPENDIR_SUPPORT)
se->conn.capable |= FUSE_CAP_NO_OPENDIR_SUPPORT;
- if (arg->flags & FUSE_EXPLICIT_INVAL_DATA)
+ if (inargflags & FUSE_EXPLICIT_INVAL_DATA)
se->conn.capable |= FUSE_CAP_EXPLICIT_INVAL_DATA;
- if (!(arg->flags & FUSE_MAX_PAGES)) {
+ if (!(inargflags & FUSE_MAX_PAGES)) {
size_t max_bufsize =
FUSE_DEFAULT_MAX_PAGES_PER_REQ * getpagesize()
+ FUSE_BUFFER_HEADER_SIZE;
@@ -2068,39 +2072,44 @@ void do_init(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
outarg.flags |= FUSE_MAX_PAGES;
outarg.max_pages = (se->conn.max_write - 1) / getpagesize() + 1;
}
-
+ outargflags = outarg.flags;
/* Always enable big writes, this is superseded
by the max_write option */
- outarg.flags |= FUSE_BIG_WRITES;
+ outargflags |= FUSE_BIG_WRITES;
if (se->conn.want & FUSE_CAP_ASYNC_READ)
- outarg.flags |= FUSE_ASYNC_READ;
+ outargflags |= FUSE_ASYNC_READ;
if (se->conn.want & FUSE_CAP_POSIX_LOCKS)
- outarg.flags |= FUSE_POSIX_LOCKS;
+ outargflags |= FUSE_POSIX_LOCKS;
if (se->conn.want & FUSE_CAP_ATOMIC_O_TRUNC)
- outarg.flags |= FUSE_ATOMIC_O_TRUNC;
+ outargflags |= FUSE_ATOMIC_O_TRUNC;
if (se->conn.want & FUSE_CAP_EXPORT_SUPPORT)
- outarg.flags |= FUSE_EXPORT_SUPPORT;
+ outargflags |= FUSE_EXPORT_SUPPORT;
if (se->conn.want & FUSE_CAP_DONT_MASK)
- outarg.flags |= FUSE_DONT_MASK;
+ outargflags |= FUSE_DONT_MASK;
if (se->conn.want & FUSE_CAP_FLOCK_LOCKS)
- outarg.flags |= FUSE_FLOCK_LOCKS;
+ outargflags |= FUSE_FLOCK_LOCKS;
if (se->conn.want & FUSE_CAP_AUTO_INVAL_DATA)
- outarg.flags |= FUSE_AUTO_INVAL_DATA;
+ outargflags |= FUSE_AUTO_INVAL_DATA;
if (se->conn.want & FUSE_CAP_READDIRPLUS)
- outarg.flags |= FUSE_DO_READDIRPLUS;
+ outargflags |= FUSE_DO_READDIRPLUS;
if (se->conn.want & FUSE_CAP_READDIRPLUS_AUTO)
- outarg.flags |= FUSE_READDIRPLUS_AUTO;
+ outargflags |= FUSE_READDIRPLUS_AUTO;
if (se->conn.want & FUSE_CAP_ASYNC_DIO)
- outarg.flags |= FUSE_ASYNC_DIO;
+ outargflags |= FUSE_ASYNC_DIO;
if (se->conn.want & FUSE_CAP_WRITEBACK_CACHE)
- outarg.flags |= FUSE_WRITEBACK_CACHE;
+ outargflags |= FUSE_WRITEBACK_CACHE;
if (se->conn.want & FUSE_CAP_POSIX_ACL)
- outarg.flags |= FUSE_POSIX_ACL;
+ outargflags |= FUSE_POSIX_ACL;
if (se->conn.want & FUSE_CAP_CACHE_SYMLINKS)
- outarg.flags |= FUSE_CACHE_SYMLINKS;
+ outargflags |= FUSE_CACHE_SYMLINKS;
if (se->conn.want & FUSE_CAP_EXPLICIT_INVAL_DATA)
- outarg.flags |= FUSE_EXPLICIT_INVAL_DATA;
+ outargflags |= FUSE_EXPLICIT_INVAL_DATA;
+
+ outarg.flags = outargflags;
+
+ if (inargflags & FUSE_INIT_EXT)
+ outarg.flags2 = outargflags >> 32;
outarg.max_readahead = se->conn.max_readahead;
outarg.max_write = se->conn.max_write;
if (se->conn.proto_minor >= 13) {
--
2.41.0

View File

@ -1,121 +0,0 @@
From 8fd95ab0a62a753896fdd3b5fcb68603f0e41ad3 Mon Sep 17 00:00:00 2001
From: HereThereBeDragons <HereThereBeDragons@users.noreply.github.com>
Date: Thu, 27 Oct 2022 17:52:10 +0200
Subject: [PATCH] Initial patch provided by Miklos Szeredi
<mszeredi@redhat.com>
Signed-off-by: Pavel Reichl <preichl@redhat.com>
---
include/fuse_kernel.h | 8 +++++++-
include/fuse_lowlevel.h | 8 ++++++++
lib/fuse_lowlevel.c | 18 ++++++++++++++----
lib/fuse_versionscript | 1 +
4 files changed, 30 insertions(+), 5 deletions(-)
diff --git a/include/fuse_kernel.h b/include/fuse_kernel.h
index 09da620..e0666a1 100644
--- a/include/fuse_kernel.h
+++ b/include/fuse_kernel.h
@@ -387,6 +387,12 @@ struct fuse_file_lock {
*/
#define FUSE_FSYNC_FDATASYNC (1 << 0)
+/**
+ * notify_inval_entry flags
+ * FUSE_EXPIRE_ONLY
+ */
+#define FUSE_EXPIRE_ONLY (1 << 0)
+
enum fuse_opcode {
FUSE_LOOKUP = 1,
FUSE_FORGET = 2, /* no reply */
@@ -800,7 +806,7 @@ struct fuse_notify_inval_inode_out {
struct fuse_notify_inval_entry_out {
uint64_t parent;
uint32_t namelen;
- uint32_t padding;
+ uint32_t flags;
};
struct fuse_notify_delete_out {
diff --git a/include/fuse_lowlevel.h b/include/fuse_lowlevel.h
index b76be71..cceb9be 100644
--- a/include/fuse_lowlevel.h
+++ b/include/fuse_lowlevel.h
@@ -1675,6 +1675,14 @@ int fuse_lowlevel_notify_inval_inode(struct fuse_session *se, fuse_ino_t ino,
int fuse_lowlevel_notify_inval_entry(struct fuse_session *se, fuse_ino_t parent,
const char *name, size_t namelen);
+enum fuse_expire_flags {
+ FUSE_LL_EXPIRE_ONLY = (1 << 0),
+};
+
+int fuse_lowlevel_notify_expire_entry(struct fuse_session *se, fuse_ino_t parent,
+ const char *name, size_t namelen,
+ enum fuse_expire_flags flags);
+
/**
* This function behaves like fuse_lowlevel_notify_inval_entry() with
* the following additional effect (at least as of Linux kernel 4.8):
diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c
index e82cd9e..7b9d710 100644
--- a/lib/fuse_lowlevel.c
+++ b/lib/fuse_lowlevel.c
@@ -2268,21 +2268,24 @@ int fuse_lowlevel_notify_inval_inode(struct fuse_session *se, fuse_ino_t ino,
return send_notify_iov(se, FUSE_NOTIFY_INVAL_INODE, iov, 2);
}
-int fuse_lowlevel_notify_inval_entry(struct fuse_session *se, fuse_ino_t parent,
- const char *name, size_t namelen)
+int fuse_lowlevel_notify_expire_entry(struct fuse_session *se, fuse_ino_t parent,
+ const char *name, size_t namelen,
+ enum fuse_expire_flags flags)
{
struct fuse_notify_inval_entry_out outarg;
struct iovec iov[3];
if (!se)
return -EINVAL;
-
+
if (se->conn.proto_minor < 12)
return -ENOSYS;
outarg.parent = parent;
outarg.namelen = namelen;
- outarg.padding = 0;
+ outarg.flags = 0;
+ if (flags & FUSE_LL_EXPIRE_ONLY)
+ outarg.flags |= FUSE_EXPIRE_ONLY;
iov[1].iov_base = &outarg;
iov[1].iov_len = sizeof(outarg);
@@ -2292,6 +2295,13 @@ int fuse_lowlevel_notify_inval_entry(struct fuse_session *se, fuse_ino_t parent,
return send_notify_iov(se, FUSE_NOTIFY_INVAL_ENTRY, iov, 3);
}
+int fuse_lowlevel_notify_inval_entry(struct fuse_session *se, fuse_ino_t parent,
+ const char *name, size_t namelen)
+{
+ return fuse_lowlevel_notify_expire_entry(se, parent, name, namelen, 0);
+}
+
+
int fuse_lowlevel_notify_delete(struct fuse_session *se,
fuse_ino_t parent, fuse_ino_t child,
const char *name, size_t namelen)
diff --git a/lib/fuse_versionscript b/lib/fuse_versionscript
index a1e9ed8..114f592 100644
--- a/lib/fuse_versionscript
+++ b/lib/fuse_versionscript
@@ -166,6 +166,7 @@
global:
fuse_set_log_func;
fuse_log;
+ fuse_lowlevel_notify_expire_entry;
} FUSE_3.4;
# Local Variables:
--
2.41.0

View File

@ -1,128 +0,0 @@
From 91083df90eadc0e69e4ce6956f823a2acb602f25 Mon Sep 17 00:00:00 2001
From: HereThereBeDragons <HereThereBeDragons@users.noreply.github.com>
Date: Thu, 27 Oct 2022 17:52:10 +0200
Subject: [PATCH] adding comments and capability discovery, enum for flags
moved to top of file
Signed-off-by: Pavel Reichl <preichl@redhat.com>
---
example/printcap.c | 2 ++
include/fuse_common.h | 16 ++++++++++++++++
include/fuse_lowlevel.h | 40 ++++++++++++++++++++++++++++++++++++----
lib/fuse_lowlevel.c | 2 ++
4 files changed, 56 insertions(+), 4 deletions(-)
diff --git a/example/printcap.c b/example/printcap.c
index edfd8f5..4867988 100644
--- a/example/printcap.c
+++ b/example/printcap.c
@@ -81,6 +81,8 @@ static void pc_init(void *userdata,
printf("\tFUSE_CAP_NO_OPENDIR_SUPPORT\n");
if(conn->capable & FUSE_CAP_EXPLICIT_INVAL_DATA)
printf("\tFUSE_CAP_EXPLICIT_INVAL_DATA\n");
+ if(conn->capable & FUSE_CAP_EXPIRE_ONLY)
+ printf("\tFUSE_CAP_EXPIRE_ONLY\n");
fuse_session_exit(se);
}
diff --git a/include/fuse_common.h b/include/fuse_common.h
index e9d8745..dbba05a 100644
--- a/include/fuse_common.h
+++ b/include/fuse_common.h
@@ -408,6 +408,22 @@ struct fuse_loop_config_v1 {
*/
#define FUSE_CAP_EXPLICIT_INVAL_DATA (1 << 25)
+/**
+ * Indicates support that dentries can be expired or invalidated.
+ *
+ * Expiring dentries, instead of invalidating them, makes a difference for
+ * overmounted dentries, where plain invalidation would detach all submounts
+ * before dropping the dentry from the cache. If only expiry is set on the
+ * dentry, then any overmounts are left alone and until ->d_revalidate()
+ * is called.
+ *
+ * Note: ->d_revalidate() is not called for the case of following a submount,
+ * so invalidation will only be triggered for the non-overmounted case.
+ * The dentry could also be mounted in a different mount instance, in which case
+ * any submounts will still be detached.
+*/
+#define FUSE_CAP_EXPIRE_ONLY (1 << 26)
+
/**
* Ioctl flags
*
diff --git a/include/fuse_lowlevel.h b/include/fuse_lowlevel.h
index cceb9be..6bad70e 100644
--- a/include/fuse_lowlevel.h
+++ b/include/fuse_lowlevel.h
@@ -127,6 +127,15 @@ struct fuse_forget_data {
uint64_t nlookup;
};
+/**
+ * Flags for fuse_lowlevel_notify_expire_entry()
+ * 0 = invalidate entry
+ * FUSE_LL_EXPIRE_ONLY = expire entry
+*/
+enum fuse_expire_flags {
+ FUSE_LL_EXPIRE_ONLY = (1 << 0),
+};
+
/* 'to_set' flags in setattr */
#define FUSE_SET_ATTR_MODE (1 << 0)
#define FUSE_SET_ATTR_UID (1 << 1)
@@ -1675,10 +1684,33 @@ int fuse_lowlevel_notify_inval_inode(struct fuse_session *se, fuse_ino_t ino,
int fuse_lowlevel_notify_inval_entry(struct fuse_session *se, fuse_ino_t parent,
const char *name, size_t namelen);
-enum fuse_expire_flags {
- FUSE_LL_EXPIRE_ONLY = (1 << 0),
-};
-
+/**
+ * Notify to expire or invalidate parent attributes and the dentry
+ * matching parent/name
+ *
+ * Underlying function for fuse_lowlevel_notify_inval_entry().
+ *
+ * In addition to invalidating an entry, it also allows to expire an entry.
+ * In that case, the entry is not forcefully removed from kernel cache
+ * but instead the next access to it forces a lookup from the filesystem.
+ *
+ * This makes a difference for overmounted dentries, where plain invalidation
+ * would detach all submounts before dropping the dentry from the cache.
+ * If only expiry is set on the dentry, then any overmounts are left alone and
+ * until ->d_revalidate() is called.
+ *
+ * Note: ->d_revalidate() is not called for the case of following a submount,
+ * so invalidation will only be triggered for the non-overmounted case.
+ * The dentry could also be mounted in a different mount instance, in which case
+ * any submounts will still be detached.
+ *
+ * @param se the session object
+ * @param parent inode number
+ * @param name file name
+ * @param namelen strlen() of file name
+ * @param flags flags to control if the entry should be expired or invalidated
+ * @return zero for success, -errno for failure
+*/
int fuse_lowlevel_notify_expire_entry(struct fuse_session *se, fuse_ino_t parent,
const char *name, size_t namelen,
enum fuse_expire_flags flags);
diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c
index 7b9d710..7d76309 100644
--- a/lib/fuse_lowlevel.c
+++ b/lib/fuse_lowlevel.c
@@ -1991,6 +1991,8 @@ void do_init(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
bufsize = max_bufsize;
}
}
+ if (arg->minor >= 38)
+ se->conn.capable |= FUSE_CAP_EXPIRE_ONLY;
} else {
se->conn.max_readahead = 0;
}
--
2.41.0

View File

@ -1,150 +0,0 @@
From 51bc827df873d9ff4069b83796cd32fcb6bd659e Mon Sep 17 00:00:00 2001
From: HereThereBeDragons <HereThereBeDragons@users.noreply.github.com>
Date: Fri, 30 Jun 2023 14:57:06 +0200
Subject: [PATCH] Make expire only function fail if no kernel support (#789)
---
include/fuse_common.h | 2 +-
include/fuse_lowlevel.h | 28 ++++++++++++++--------------
lib/fuse_lowlevel.c | 41 ++++++++++++++++++++++++++++++++++++-----
3 files changed, 51 insertions(+), 20 deletions(-)
--- a/include/fuse_common.h
+++ b/include/fuse_common.h
@@ -395,7 +395,7 @@ struct fuse_loop_config {
#define FUSE_CAP_EXPLICIT_INVAL_DATA (1 << 25)
/**
- * Indicates support that dentries can be expired or invalidated.
+ * Indicates support that dentries can be expired.
*
* Expiring dentries, instead of invalidating them, makes a difference for
* overmounted dentries, where plain invalidation would detach all submounts
--- a/include/fuse_lowlevel.h
+++ b/include/fuse_lowlevel.h
@@ -128,11 +128,12 @@ struct fuse_forget_data {
};
/**
- * Flags for fuse_lowlevel_notify_expire_entry()
+ * Flags for fuse_lowlevel_notify_entry()
* 0 = invalidate entry
* FUSE_LL_EXPIRE_ONLY = expire entry
*/
-enum fuse_expire_flags {
+enum fuse_notify_entry_flags {
+ FUSE_LL_INVALIDATE = 0,
FUSE_LL_EXPIRE_ONLY = (1 << 0),
};
@@ -1657,8 +1658,7 @@ int fuse_lowlevel_notify_inval_inode(str
off_t off, off_t len);
/**
- * Notify to invalidate parent attributes and the dentry matching
- * parent/name
+ * Notify to invalidate parent attributes and the dentry matching parent/name
*
* To avoid a deadlock this function must not be called in the
* execution path of a related filesytem operation or within any code
@@ -1685,14 +1685,13 @@ int fuse_lowlevel_notify_inval_entry(str
const char *name, size_t namelen);
/**
- * Notify to expire or invalidate parent attributes and the dentry
- * matching parent/name
+ * Notify to expire parent attributes and the dentry matching parent/name
*
- * Underlying function for fuse_lowlevel_notify_inval_entry().
+ * Same restrictions apply as for fuse_lowlevel_notify_inval_entry()
*
- * In addition to invalidating an entry, it also allows to expire an entry.
- * In that case, the entry is not forcefully removed from kernel cache
- * but instead the next access to it forces a lookup from the filesystem.
+ * Compared to invalidating an entry, expiring the entry results not in a
+ * forceful removal of that entry from kernel cache but instead the next access
+ * to it forces a lookup from the filesystem.
*
* This makes a difference for overmounted dentries, where plain invalidation
* would detach all submounts before dropping the dentry from the cache.
@@ -1703,17 +1702,18 @@ int fuse_lowlevel_notify_inval_entry(str
* so invalidation will only be triggered for the non-overmounted case.
* The dentry could also be mounted in a different mount instance, in which case
* any submounts will still be detached.
+ *
+ * Added in FUSE protocol version 7.38. If the kernel does not support
+ * this (or a newer) version, the function will return -ENOSYS and do nothing.
*
* @param se the session object
* @param parent inode number
* @param name file name
* @param namelen strlen() of file name
- * @param flags flags to control if the entry should be expired or invalidated
- * @return zero for success, -errno for failure
+ * @return zero for success, -errno for failure, -enosys if no kernel support
*/
int fuse_lowlevel_notify_expire_entry(struct fuse_session *se, fuse_ino_t parent,
- const char *name, size_t namelen,
- enum fuse_expire_flags flags);
+ const char *name, size_t namelen);
/**
* This function behaves like fuse_lowlevel_notify_inval_entry() with
--- a/lib/fuse_lowlevel.c
+++ b/lib/fuse_lowlevel.c
@@ -2257,9 +2257,28 @@ int fuse_lowlevel_notify_inval_inode(str
return send_notify_iov(se, FUSE_NOTIFY_INVAL_INODE, iov, 2);
}
-int fuse_lowlevel_notify_expire_entry(struct fuse_session *se, fuse_ino_t parent,
- const char *name, size_t namelen,
- enum fuse_expire_flags flags)
+/**
+ * Notify parent attributes and the dentry matching parent/name
+ *
+ * Underlying base function for fuse_lowlevel_notify_inval_entry() and
+ * fuse_lowlevel_notify_expire_entry().
+ *
+ * @warning
+ * Only checks if fuse_lowlevel_notify_inval_entry() is supported by
+ * the kernel. All other flags will fall back to
+ * fuse_lowlevel_notify_inval_entry() if not supported!
+ * DO THE PROPER CHECKS IN THE DERIVED FUNCTION!
+ *
+ * @param se the session object
+ * @param parent inode number
+ * @param name file name
+ * @param namelen strlen() of file name
+ * @param flags flags to control if the entry should be expired or invalidated
+ * @return zero for success, -errno for failure
+*/
+static int fuse_lowlevel_notify_entry(struct fuse_session *se, fuse_ino_t parent,
+ const char *name, size_t namelen,
+ enum fuse_notify_entry_flags flags)
{
struct fuse_notify_inval_entry_out outarg;
struct iovec iov[3];
@@ -2285,9 +2304,21 @@ int fuse_lowlevel_notify_expire_entry(st
}
int fuse_lowlevel_notify_inval_entry(struct fuse_session *se, fuse_ino_t parent,
- const char *name, size_t namelen)
+ const char *name, size_t namelen)
+{
+ return fuse_lowlevel_notify_entry(se, parent, name, namelen, FUSE_LL_INVALIDATE);
+}
+
+int fuse_lowlevel_notify_expire_entry(struct fuse_session *se, fuse_ino_t parent,
+ const char *name, size_t namelen)
{
- return fuse_lowlevel_notify_expire_entry(se, parent, name, namelen, 0);
+ if (!se)
+ return -EINVAL;
+
+ if (!(se->conn.capable & FUSE_CAP_EXPIRE_ONLY))
+ return -ENOSYS;
+
+ return fuse_lowlevel_notify_entry(se, parent, name, namelen, FUSE_LL_EXPIRE_ONLY);
}

View File

@ -1,42 +0,0 @@
From 2c736f516f28dfb5c58aff345c668a5ea6386295 Mon Sep 17 00:00:00 2001
From: Miklos Szeredi <mszeredi@redhat.com>
Date: Wed, 10 Jan 2024 10:15:43 +0100
Subject: [PATCH] Don't set FUSE_CAP_PARALLEL_DIROPS by default
Allowing parallel dir operations could result in a crash in a filesystem
implementation that is not prepared for this.
To be safe keep this flag off by default (this is not a regression, since
there was no public release where this flag wasn't ignored).
If the filesystem wants better performance, then it should set this flag
explicitly.
Fixes: c9905341ea34 ("Pass FUSE_PARALLEL_DIROPS to kernel (#861)")
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
---
include/fuse_common.h | 2 --
lib/fuse_lowlevel.c | 1 -
2 files changed, 3 deletions(-)
--- a/include/fuse_common.h
+++ b/include/fuse_common.h
@@ -313,8 +313,6 @@ struct fuse_loop_config {
* is unset, the FUSE kernel module will ensure that lookup() and
* readdir() requests are never issued concurrently for the same
* directory.
- *
- * This feature is enabled by default when supported by the kernel.
*/
#define FUSE_CAP_PARALLEL_DIROPS (1 << 18)
--- a/lib/fuse_lowlevel.c
+++ b/lib/fuse_lowlevel.c
@@ -2009,7 +2009,6 @@ void do_init(fuse_req_t req, fuse_ino_t
if ((cond) && (se->conn.capable & (cap))) \
se->conn.want |= (cap)
LL_SET_DEFAULT(1, FUSE_CAP_ASYNC_READ);
- LL_SET_DEFAULT(1, FUSE_CAP_PARALLEL_DIROPS);
LL_SET_DEFAULT(1, FUSE_CAP_AUTO_INVAL_DATA);
LL_SET_DEFAULT(1, FUSE_CAP_HANDLE_KILLPRIV);
LL_SET_DEFAULT(1, FUSE_CAP_ASYNC_DIO);

View File

@ -1,23 +0,0 @@
From c9905341ea34ff9acbc11b3c53ba8bcea35eeed8 Mon Sep 17 00:00:00 2001
From: fdinoff <fdinoff@google.com>
Date: Thu, 16 Nov 2023 06:23:20 -0500
Subject: [PATCH] Pass FUSE_PARALLEL_DIROPS to kernel (#861)
This tells the kernel that parallel lookup/readdir operations are
supported. This is enabled by default but was not passed to the kernel
so you always get the synchronized version.
---
lib/fuse_lowlevel.c | 2 ++
1 file changed, 2 insertions(+)
--- a/lib/fuse_lowlevel.c
+++ b/lib/fuse_lowlevel.c
@@ -2093,6 +2093,8 @@ void do_init(fuse_req_t req, fuse_ino_t
outargflags |= FUSE_ASYNC_DIO;
if (se->conn.want & FUSE_CAP_WRITEBACK_CACHE)
outargflags |= FUSE_WRITEBACK_CACHE;
+ if (se->conn.want & FUSE_CAP_PARALLEL_DIROPS)
+ outargflags |= FUSE_PARALLEL_DIROPS;
if (se->conn.want & FUSE_CAP_POSIX_ACL)
outargflags |= FUSE_POSIX_ACL;
if (se->conn.want & FUSE_CAP_CACHE_SYMLINKS)

View File

@ -1,35 +0,0 @@
From 29f621af8d39d5a140da584ff6c1eb00147b5a56 Mon Sep 17 00:00:00 2001
From: Miklos Szeredi <mszeredi@redhat.com>
Date: Thu, 13 Jun 2024 13:57:25 +0200
Subject: [PATCH] libfuse: null-terminate buffer in fuse_req_getgroups()
After reading the file /proc/$PID/task/$PID/status the buffer wasn't
terminated with a null character. This could theoretically lead to buffer
overrun by the subsequent strstr() call.
Since the contents of the proc file are guaranteed to contain the pattern
that strstr is looking for, this doesn't happen in normal situations.
Add null termination for robustness.
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Pavel Reichl <preichl@redhat.com>
---
lib/fuse_lowlevel.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c
index fc46882..74b0424 100644
--- a/lib/fuse_lowlevel.c
+++ b/lib/fuse_lowlevel.c
@@ -3353,6 +3353,7 @@ retry:
goto retry;
}
+ buf[ret] = '\0';
ret = -EIO;
s = strstr(buf, "\nGroups:");
if (s == NULL)
--
2.45.2

View File

@ -1,45 +0,0 @@
From: Miklos Szeredi <mszeredi@redhat.com>
Subject: libfuse: add feature flag for expire-only
Add the FUSE_HAS_EXPIRE_ONLY flag. This should be used to set the
FUSE_CAP_EXPIRE_ONLY capability flag on the low level API instead of
checking for the version.
Checking the version doesn't work if the feature is backported to an
earlier kernel.
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
---
include/fuse_kernel.h | 2 ++
lib/fuse_lowlevel.c | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
--- a/include/fuse_kernel.h
+++ b/include/fuse_kernel.h
@@ -274,6 +274,7 @@
* FUSE_CACHE_SYMLINKS: cache READLINK responses
* FUSE_NO_OPENDIR_SUPPORT: kernel supports zero-message opendir
* FUSE_EXPLICIT_INVAL_DATA: only invalidate cached pages on explicit request
+ * FUSE_HAS_EXPIRE_ONLY: kernel supports expiry-only entry invalidation
*/
#define FUSE_ASYNC_READ (1 << 0)
#define FUSE_POSIX_LOCKS (1 << 1)
@@ -302,6 +303,7 @@
#define FUSE_NO_OPENDIR_SUPPORT (1 << 24)
#define FUSE_EXPLICIT_INVAL_DATA (1 << 25)
#define FUSE_INIT_EXT (1 << 30)
+#define FUSE_HAS_EXPIRE_ONLY (1ULL << 35)
/**
* CUSE INIT request/reply flags
--- a/lib/fuse_lowlevel.c
+++ b/lib/fuse_lowlevel.c
@@ -2008,7 +2008,7 @@ void do_init(fuse_req_t req, fuse_ino_t
bufsize = max_bufsize;
}
}
- if (arg->minor >= 38)
+ if (inargflags & FUSE_HAS_EXPIRE_ONLY)
se->conn.capable |= FUSE_CAP_EXPIRE_ONLY;
} else {
se->conn.max_readahead = 0;

2
ci.fmf Normal file
View File

@ -0,0 +1,2 @@
resultsdb-testcase: separate

2
fuse-3.16.pub Normal file
View File

@ -0,0 +1,2 @@
untrusted comment: signify public key
RWQtnc3WSoYwHGAdfvtTTVX8RsAXrNwMb8xqVwlY8lYY2Fxn2QUDiPYK

View File

@ -1,22 +1,29 @@
Name: fuse3
Version: 3.10.2
Release: 9%{?dist}
Summary: File System in Userspace (FUSE) v3 utilities
License: GPL+
URL: http://fuse.sf.net
Source0: https://github.com/libfuse/libfuse/archive/fuse-%{version}.tar.gz
Source1: fuse.conf
Patch0: fuse3-gcc11.patch
Patch1: fuse-3.10.4-fix-test-failure.patch
Patch2: fuse-3.11.0-Modify-structures-in-libfuse-to-handle-flags-beyond-.patch
Patch3: fuse-3.13.0-Initial-patch-provided-by-Miklos-Szeredi-mszeredi-re.patch
Patch4: fuse-3.13.0-adding-comments-and-capability-discovery-enum-for-fl.patch
Patch5: rhel-only-bz2188182-libfuse-add-feature-flag-for-expire-only.patch
Patch6: fuse-3.16.1-Make-expire-only-function-fail-if-no-kernel-support-.patch
Patch7: fuse-3.17.0-Pass-FUSE_PARALLEL_DIROPS-to-kernel-861.patch
Patch8: fuse-3.17.0-Don-t-set-FUSE_CAP_PARALLEL_DIROPS-by-default.patch
Patch9: master-libfuse-null-terminate-buffer-in-fuse_req_getgroups.patch
# Need to be specific for flatpak builds, otherwise it'll create rules
# in other directory than /app/etc which will make builds fail.
# On Fedora, this should be the same definition.
%if 0%{?flatpak}
%global _udevrulesdir %{_prefix}/lib/udev/rules.d
%endif
%global xyz_version 3.16.2
%global xy_version %(sed 's/\\(.*\\)\\..*/\\1/'<<<%{xyz_version})
Name: fuse3
Version: %{xyz_version}
Release: 8%{?dist}
Summary: File System in Userspace (FUSE) v3 utilities
License: GPL-1.0-or-later
URL: http://fuse.sf.net
Source0: https://github.com/libfuse/libfuse/releases/download/fuse-%{version}/fuse-%{version}.tar.gz
Source1: https://github.com/libfuse/libfuse/releases/download/fuse-%{version}/fuse-%{version}.tar.gz.sig
Source2: https://raw.githubusercontent.com/libfuse/libfuse/master/signify/fuse-%{xy_version}.pub
Source3: fuse.conf
Patch0: fuse3-gcc11.patch
Patch1: master-Fix-missing-fuse_loop_cfg_destroy-in-fuse_session_lo.patch
%if %{undefined rhel}
BuildRequires: signify
%endif
BuildRequires: which
%if ! 0%{?el6}
Conflicts: filesystem < 3
@ -31,11 +38,15 @@ BuildRequires: udev, kernel-devel
%else
Requires: %{_sysconfdir}/fuse.conf
%endif
Requires: %{name}-libs = %{version}-%{release}
# fuse-common 3.4.2-3 had the fuse & fuse3 man pages in it
Conflicts: fuse-common < 3.4.2-4
# The dependency from fuse3 to fuse3-libs is already implicit through
# the generated library dependency, but unless we force the exact
# version then we risk mixing different fuse3 & fuse3-libs versions
# which is not likely to be a well-tested situation upstream.
Requires: %{name}-libs = %{version}-%{release}
%description
With FUSE it is possible to implement a fully functional filesystem in a
userspace program. This package contains the FUSE v3 userspace tools to
@ -43,7 +54,7 @@ mount a FUSE filesystem.
%package libs
Summary: File System in Userspace (FUSE) v3 libraries
License: LGPLv2+
License: LGPL-2.1-or-later
%if ! 0%{?el6}
Conflicts: filesystem < 3
%endif
@ -56,7 +67,7 @@ userspace program. This package contains the FUSE v3 libraries.
Summary: File System in Userspace (FUSE) v3 devel files
Requires: %{name}-libs = %{version}-%{release}
Requires: pkgconfig
License: LGPLv2+
License: LGPL-2.1-or-later
%if ! 0%{?el6}
Conflicts: filesystem < 3
%endif
@ -69,24 +80,22 @@ pgk-config) to develop FUSE v3 based applications/filesystems.
%if ! 0%{?el6} && ! 0%{?el7}
%package -n fuse-common
Summary: Common files for File System in Userspace (FUSE) v2 and v3
License: GPL+
License: GPL-1.0-or-later
%description -n fuse-common
Common files for FUSE v2 and FUSE v3.
%endif
%prep
%setup -n libfuse-fuse-%{version}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%if %{undefined rhel}
# Fuse is using signify rather than PGG since 3.15.1 For more details see:
# https://github.com/libfuse/libfuse/releases/tag/fuse-3.15.1
signify -V -m '%{SOURCE0}' -p '%{SOURCE2}'
%endif
%setup -n fuse-%{version}
%patch -P0 -p1
%patch -P1 -p1
%build
export LC_ALL=en_US.UTF-8
@ -100,10 +109,14 @@ export LC_ALL=en_US.UTF-8
%if ! 0%{?__global_ldflags:1}
%global __global_ldflags ""
%endif
%meson -D udevrulesdir=/etc/udev/rules.d
%meson -D udevrulesdir=%{_udevrulesdir}
%else
%if 0%{?flatpak}
%meson -D udevrulesdir=%{_udevrulesdir}
%else
%meson
%endif
%endif
(cd %{_vpath_builddir}
%if 0%{?el6}
@ -119,7 +132,7 @@ ninja-build reconfigure
%meson_build
%install
export MESON_INSTALL_DESTDIR_PREFIX=%{buildroot}/usr %meson_install
export MESON_INSTALL_DESTDIR_PREFIX=%{buildroot}%{_prefix} %meson_install
find %{buildroot} .
find %{buildroot} -type f -name "*.la" -exec rm -f {} ';'
# change from 4755 to 0755 to allow stripping -- fixed later in files
@ -129,17 +142,22 @@ chmod 0755 %{buildroot}/%{_bindir}/fusermount3
rm -f %{buildroot}/%{_libdir}/*.a
# No need to create init-script
rm -f %{buildroot}%{_sysconfdir}/init.d/fuse3
# This path is hardcoded:
# https://github.com/libfuse/libfuse/blob/master/util/install_helper.sh#L43
# so flatpaks will fail unless we delete it below.
rm -f %{buildroot}/etc/init.d/fuse3
%if 0%{?el6} || 0%{?el7}
# This is in the fuse package on el7 and there's no default on el6
rm -f %{buildroot}%{_sysconfdir}/fuse.conf
%else
# Install config-file
install -p -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}
install -p -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}
%endif
# Delete pointless udev rules, which do not belong in /usr/lib (brc#748204)
rm -f %{buildroot}/usr/lib/udev/rules.d/99-fuse3.rules
# Delete pointless udev rules (brc#748204)
rm -f %{buildroot}%{_udevrulesdir}/99-fuse3.rules
%if 0%{?el6} || 0%{?el7}
%post -p /sbin/ldconfig libs
@ -158,7 +176,7 @@ rm -f %{buildroot}/usr/lib/udev/rules.d/99-fuse3.rules
%{_mandir}/man1/*
%{_mandir}/man8/*
%if 0%{?el6}
%{_sysconfdir}/udev/rules.d/*
%{_udevrulesdir}/*
%endif
%files libs
@ -176,33 +194,89 @@ rm -f %{buildroot}/usr/lib/udev/rules.d/99-fuse3.rules
%endif
%changelog
* Mon Jun 17 2024 Pavel Reichl <preichl@redhat.com> - 3.10.2-9
- libfuse: null-terminate buffer in fuse_req_getgroups()
* Tue Nov 12 2024 Pavel Reichl <preichl@redhat.com> - 3.16.2-8
- Bump the version to test execution of gating
* Wed Feb 07 2024 Pavel Reichl <preichl@redhat.com> - 3.10.2-8
- Advertise support of FUSE_PARALLEL_DIROPS to kernel
- Related: RHEL-24721
* Mon Nov 11 2024 Pavel Reichl <preichl@redhat.com> - 3.16.2-7
- Bump the version to test execution of gating
* Tue Jan 30 2024 Pavel Reichl <preichl@redhat.com> - 3.10.2-7
- Synchronize expire-only API with upstream.
- Related: RHEL-23414
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 3.16.2-6
- Bump release for October 2024 mass rebuild:
Resolves: RHEL-64018
* Thu Jul 13 2023 Pavel Reichl <preichl@redhat.com> - 3.10.2-6
- Fix feature_notify_inode_expire_only related(rhbz#2188182)
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 3.16.2-5
- Bump release for June 2024 mass rebuild
* Wed Feb 16 2022 Pavel Reichl <preichl@redhat.com> - 3.10.2-5
- Fix test failure
- Fix missing dependency
* Thu Jun 13 2024 Pavel Reichl <preichl@redhat.com> - 3.16.2-4
- Fix missing fuse_loop_cfg_destroy()
* Tue Feb 15 2022 Pavel Reichl <preichl@redhat.com> - 3.10.2-4
- Add gating.yaml file
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.16.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 3.10.2-3
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.16.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 3.10.2-2
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Fri Oct 13 2023 Pavel Reichl <preichl@redhat.com> - 3.16.2-1
- Rebase to upstream version 3.16.2
* Tue Oct 03 2023 Pavel Reichl <preichl@redhat.com> - 3.16.1-3
- Convert License tag to SPDX format
* Tue Aug 15 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 3.16.1-2
- Skip tarball signature verification in RHEL builds
* Wed Aug 09 2023 Pavel Reichl <preichl@redhat.com> - 3.16.1-1
- update to 3.16.1
- Add tarball signature verification
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.14.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Mon Jun 26 2023 Richard W.M. Jones <rjones@redhat.com> - 3.14.1-2
- Force fuse3 and fuse3-libs versions to be identical
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/LYQUYUAS7FG6FFGJBBWP7XEV563V4LBS/
* Mon Apr 3 2023 Tom Callaway <spot@fedoraproject.org> - 3.14.1-1
- update to 3.14.1
* Tue Feb 28 2023 Richard W.M. Jones <rjones@redhat.com> - 3.14.0-1
- Update to 3.14.0
* Wed Feb 8 2023 Tom Callaway <spot@fedoraproject.org> - 3.13.1-1
- update to 3.13.1
* Fri Jan 20 2023 Tom Callaway <spot@fedoraproject.org> - 3.13.0-1
- update to 3.13.0
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.12.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Fri Sep 9 2022 Tom Callaway <spot@fedoraproject.org> - 3.12.0-1
- update to 3.12.0
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.10.5-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Mon Feb 21 2022 Tom Callaway <spot@fedoraproject.org> - 3.10.5-4
- force udevrulesdir option for flatpak builds
* Wed Feb 16 2022 Tom Callaway <spot@fedoraproject.org> - 3.10.5-3
- fix flatpak issues
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.10.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Thu Sep 16 2021 Tom Callaway <spot@fedoraproject.org> - 3.10.5-1
- update to 3.10.5
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.10.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Tue Jun 15 2021 Tom Callaway <spot@fedoraproject.org> - 3.10.4-1
- update to 3.10.4
* Thu May 6 2021 Tom Callaway <spot@fedoraproject.org> - 3.10.3-1
- update to 3.10.3
* Fri Feb 5 2021 Tom Callaway <spot@fedoraproject.org> - 3.10.2-1
- update to 3.10.2

8
gating.yaml Normal file
View File

@ -0,0 +1,8 @@
# Gating RHEL
--- !Policy
product_versions:
- rhel-*
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: osci.brew-build./plans/internal.functional}
- !PassingTestCaseRule {test_case_name: osci.brew-build./plans/public.functional}

View File

@ -0,0 +1,39 @@
From b701673e7429336248c307c93c2c26f443719255 Mon Sep 17 00:00:00 2001
From: Bernd Schubert <bernd.schubert@fastmail.fm>
Date: Sun, 5 May 2024 13:09:56 +0200
Subject: [PATCH] Fix missing fuse_loop_cfg_destroy() in
fuse_session_loop_mt_31 (#944)
All credits to Miklos Szeredi <miklos@szeredi.hu> for spotting
this.
Signed-off-by: Bernd Schubert <bernd.schubert@fastmail.fm>
Signed-off-by: Pavel Reichl <preichl@redhat.com>
---
lib/fuse_loop_mt.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/lib/fuse_loop_mt.c b/lib/fuse_loop_mt.c
index 70ff8f8..ecf8af8 100644
--- a/lib/fuse_loop_mt.c
+++ b/lib/fuse_loop_mt.c
@@ -440,10 +440,15 @@ int fuse_session_loop_mt_31(struct fuse_session *se, int clone_fd);
FUSE_SYMVER("fuse_session_loop_mt_31", "fuse_session_loop_mt@FUSE_3.0")
int fuse_session_loop_mt_31(struct fuse_session *se, int clone_fd)
{
+ int err;
struct fuse_loop_config *config = fuse_loop_cfg_create();
if (clone_fd > 0)
fuse_loop_cfg_set_clone_fd(config, clone_fd);
- return fuse_session_loop_mt_312(se, config);
+ err = fuse_session_loop_mt_312(se, config);
+
+ fuse_loop_cfg_destroy(config);
+
+ return err;
}
struct fuse_loop_config *fuse_loop_cfg_create(void)
--
2.45.2

20
plans/internal.fmf Normal file
View File

@ -0,0 +1,20 @@
summary: Private (RHEL) fuse3 gating test
enabled: false
adjust:
- when: distro == rhel
enabled: true
because: private tests are accesible only within rhel pipline
discover:
- name: rhel-fuse3
how: fmf
url: https://gitlab.cee.redhat.com/kernel-qe/kernel.git
test: [
"filesystems/fuse/gating/fuse3",
]
environment:
FSTYP: ext4
TEST_GROUP: fuse3
AVC_ERROR: +no_avc_check
execute:
how: tmt

8
plans/public.fmf Normal file
View File

@ -0,0 +1,8 @@
summary: Public fuse3 gating test
execute:
how: tmt
discover:
how: fmf
test: [
"fuse3-sanity-test",
]

2
sources Normal file
View File

@ -0,0 +1,2 @@
SHA512 (fuse-3.16.2.tar.gz) = 3e8889863cd67dada67271f095f694dc9e5aaf2561fd1e2285aee95b5a54e692bb195ab8fce57fc2bdf08d0ea17b6d56ca4967b4e4371d639d6133907b2370d3
SHA512 (fuse-3.16.2.tar.gz.sig) = 4417f6964ae330634a3af556172e9cc8b9b42eeffa9262421002586ba02701fa1ef0fa07ee8e7e4ded6b019ebc03636397b17705d46c754f1466f1863241b8b9

View File

@ -0,0 +1,60 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of fuse3-sanity-test
# Description: fuse3-sanity-test
# Author: Boyang Xue <bxue@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2024 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export TEST=/kernel/filesystems/fuse/gating/fuse3
export TESTVERSION=0.1
FILES=$(METADATA) runtest.sh Makefile PURPOSE
.PHONY: all install download clean
run: $(FILES) build
./runtest.sh
build: $(BUILT_FILES)
test -x runtest.sh || chmod a+x runtest.sh
clean:
rm -f *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@echo "Owner: Boyang Xue <bxue@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: fuse3-sanity-test" >> $(METADATA)
@echo "Type: Regression" >> $(METADATA)
@echo "TestTime: 15m" >> $(METADATA)
@echo "RunFor: fuse3" >> $(METADATA)
@echo "Requires: fuse3-libs" >> $(METADATA)
@echo "Requires: fuse3-devel" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2+" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
rhts-lint $(METADATA)

View File

@ -0,0 +1,5 @@
PURPOSE of fuse3-sanity-test
Description: fuse3-sanity-test
Author: Boyang Xue <bxue@redhat.com>
Note:

View File

@ -0,0 +1,12 @@
summary: fuse3-sanity-test
description: |
Note:
contact: Boyang Xue <bxue@redhat.com>
component:
- fuse3
test: ./runtest.sh
framework: beakerlib
recommend:
- fuse3-libs
- fuse3-devel
duration: 15m

View File

@ -0,0 +1,37 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of fuse3-sanity-test
# Description: fuse3-sanity-test
# Author: Boyang Xue <bxue@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2024 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include Beaker environment
. /usr/share/beakerlib/beakerlib.sh || exit 1
set -o pipefail
rlJournalStart
rlPhaseStartTest Test
rlRun "fusermount3 --version"
rlPhaseEnd
rlJournalEnd