Projects
home:pandora:RobinOS23
e2fsprogs
_service:download_src_package:0001-change-to-us...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:download_src_package:0001-change-to-use-fuse3.patch of Package e2fsprogs
From 2705c51d4253ac8e45cc06d68b46ed36b28553c2 Mon Sep 17 00:00:00 2001 From: Chunmei Xu <xuchunmei@linux.alibaba.com> Date: Tue, 22 Mar 2022 23:42:19 +0800 Subject: [PATCH] change to use fuse3 Signed-off-by: Chunmei Xu <xuchunmei@linux.alibaba.com> --- configure.ac | 10 +++++----- misc/fuse2fs.c | 30 ++++++++++-------------------- 2 files changed, 15 insertions(+), 25 deletions(-) diff --git a/configure.ac b/configure.ac index dff3d1ca..59dc0000 100644 --- a/configure.ac +++ b/configure.ac @@ -1286,10 +1286,10 @@ else AC_CHECK_HEADERS([pthread.h fuse.h], [], [AC_MSG_FAILURE([Cannot find fuse2fs headers.])], [#define _FILE_OFFSET_BITS 64 -#define FUSE_USE_VERSION 29]) +#define FUSE_USE_VERSION 30]) AC_PREPROC_IFELSE( -[AC_LANG_PROGRAM([[#define FUSE_USE_VERSION 29 +[AC_LANG_PROGRAM([[#define FUSE_USE_VERSION 30 #ifdef __linux__ #include <linux/fs.h> #include <linux/falloc.h> @@ -1298,14 +1298,14 @@ else ]], [])], [], [AC_MSG_FAILURE([Cannot find fuse2fs Linux headers.])]) AC_CHECK_LIB(osxfuse, fuse_main, [FUSE_LIB=-losxfuse], - [AC_CHECK_LIB(fuse, fuse_main, [FUSE_LIB=-lfuse], + [AC_CHECK_LIB(fuse3, fuse_main_real, [FUSE_LIB=-lfuse3], [AC_MSG_FAILURE([Cannot find fuse library.])])]) AC_MSG_RESULT([Enabling fuse2fs]) fi , AC_CHECK_HEADERS([pthread.h fuse.h], [], [FUSE_CMT="#"], [#define _FILE_OFFSET_BITS 64 -#define FUSE_USE_VERSION 29 +#define FUSE_USE_VERSION 30 #ifdef __linux__ # include <linux/fs.h> # include <linux/falloc.h> @@ -1314,7 +1314,7 @@ AC_CHECK_HEADERS([pthread.h fuse.h], [], [FUSE_CMT="#"], if test -z "$FUSE_CMT" then AC_CHECK_LIB(osxfuse, fuse_main, [FUSE_LIB=-losxfuse], -[AC_CHECK_LIB(fuse, fuse_main, [FUSE_LIB=-lfuse], [FUSE_CMT="#"])]) +[AC_CHECK_LIB(fuse3, fuse_main_real, [FUSE_LIB=-lfuse3], [FUSE_CMT="#"])]) fi if test -z "$FUSE_CMT" then diff --git a/misc/fuse2fs.c b/misc/fuse2fs.c index c5957212..68fe9091 100644 --- a/misc/fuse2fs.c +++ b/misc/fuse2fs.c @@ -9,7 +9,7 @@ * %End-Header% */ #define _FILE_OFFSET_BITS 64 -#define FUSE_USE_VERSION 29 +#define FUSE_USE_VERSION 30 #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif @@ -727,7 +727,7 @@ static void op_destroy(void *p EXT2FS_ATTR((unused))) } } -static void *op_init(struct fuse_conn_info *conn) +static void *op_init(struct fuse_conn_info *conn, struct fuse_config *cfg) { struct fuse_context *ctxt = fuse_get_context(); struct fuse2fs *ff = (struct fuse2fs *)ctxt->private_data; @@ -797,7 +797,7 @@ static int stat_inode(ext2_filsys fs, ext2_ino_t ino, struct stat *statbuf) return ret; } -static int op_getattr(const char *path, struct stat *statbuf) +static int op_getattr(const char *path, struct stat *statbuf, struct fuse_file_info *fi) { struct fuse_context *ctxt = fuse_get_context(); struct fuse2fs *ff = (struct fuse2fs *)ctxt->private_data; @@ -1541,7 +1541,7 @@ static int update_dotdot_helper(ext2_ino_t dir EXT2FS_ATTR((unused)), return 0; } -static int op_rename(const char *from, const char *to) +static int op_rename(const char *from, const char *to, unsigned int flags) { struct fuse_context *ctxt = fuse_get_context(); struct fuse2fs *ff = (struct fuse2fs *)ctxt->private_data; @@ -1870,7 +1870,7 @@ out: return ret; } -static int op_chmod(const char *path, mode_t mode) +static int op_chmod(const char *path, mode_t mode, struct fuse_file_info *fi) { struct fuse_context *ctxt = fuse_get_context(); struct fuse2fs *ff = (struct fuse2fs *)ctxt->private_data; @@ -1929,7 +1929,7 @@ out: return ret; } -static int op_chown(const char *path, uid_t owner, gid_t group) +static int op_chown(const char *path, uid_t owner, gid_t group, struct fuse_file_info *fi) { struct fuse_context *ctxt = fuse_get_context(); struct fuse2fs *ff = (struct fuse2fs *)ctxt->private_data; @@ -1999,7 +1999,7 @@ out: return ret; } -static int op_truncate(const char *path, off_t len) +static int op_truncate(const char *path, off_t len, struct fuse_file_info *fi) { struct fuse_context *ctxt = fuse_get_context(); struct fuse2fs *ff = (struct fuse2fs *)ctxt->private_data; @@ -2751,7 +2751,7 @@ static int op_readdir_iter(ext2_ino_t dir EXT2FS_ATTR((unused)), memcpy(namebuf, dirent->name, dirent->name_len & 0xFF); namebuf[dirent->name_len & 0xFF] = 0; - ret = i->func(i->buf, namebuf, NULL, 0); + ret = i->func(i->buf, namebuf, NULL, 0, 0); if (ret) return DIRENT_ABORT; @@ -2761,7 +2761,7 @@ static int op_readdir_iter(ext2_ino_t dir EXT2FS_ATTR((unused)), static int op_readdir(const char *path EXT2FS_ATTR((unused)), void *buf, fuse_fill_dir_t fill_func, off_t offset EXT2FS_ATTR((unused)), - struct fuse_file_info *fp) + struct fuse_file_info *fp, enum fuse_readdir_flags flags) { struct fuse_context *ctxt = fuse_get_context(); struct fuse2fs *ff = (struct fuse2fs *)ctxt->private_data; @@ -3568,7 +3568,7 @@ out: return ret; } # endif /* SUPPORT_FALLOCATE */ -#endif /* FUSE 29 */ +#endif /* FUSE 30 */ static struct fuse_operations fs_ops = { .init = op_init, @@ -3601,14 +3601,6 @@ static struct fuse_operations fs_ops = { .fsyncdir = op_fsync, .access = op_access, .create = op_create, - .ftruncate = op_ftruncate, - .fgetattr = op_fgetattr, - .utimens = op_utimens, -#if FUSE_VERSION >= FUSE_MAKE_VERSION(2, 9) -# if defined(UTIME_NOW) || defined(UTIME_OMIT) - .flag_utime_omit_ok = 1, -# endif -#endif .bmap = op_bmap, #ifdef SUPERFLUOUS .lock = op_lock, @@ -3616,10 +3608,8 @@ static struct fuse_operations fs_ops = { #endif #if FUSE_VERSION >= FUSE_MAKE_VERSION(2, 8) .ioctl = op_ioctl, - .flag_nullpath_ok = 1, #endif #if FUSE_VERSION >= FUSE_MAKE_VERSION(2, 9) - .flag_nopath = 1, # ifdef SUPPORT_FALLOCATE .fallocate = op_fallocate, # endif -- 2.19.1.6.gb485710b
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2