[Git][reproducible-builds/disorderfs][rclobus/fuse3] 2 commits: It runs again.
Roland Clobus (@rclobus)
gitlab at salsa.debian.org
Fri Jan 2 11:23:53 UTC 2026
Roland Clobus pushed to branch rclobus/fuse3 at Reproducible Builds / disorderfs
Commits:
b9d14415 by Roland Clobus at 2026-01-02T12:01:16+01:00
It runs again.
Merged functionality of the duplicate functions
- - - - -
76042bf7 by Roland Clobus at 2026-01-02T12:23:19+01:00
Clean up after reading fuse3 NEWS
- - - - -
2 changed files:
- Makefile
- disorderfs.cpp
Changes:
=====================================
Makefile
=====================================
@@ -31,7 +31,7 @@ HAS_A2X ?= $(shell command -v a2x >/dev/null && echo yes || echo no)
# FUSE
PKG_CONFIG ?= pkg-config
FUSE_CFLAGS ?= $(shell $(PKG_CONFIG) --cflags fuse3) -DFUSE_USE_VERSION=31
-FUSE_LIBS ?= $(shell $(PKG_CONFIG) --libs fuse3) ## DO NOT COMMIT ## -lulockmgr
+FUSE_LIBS ?= $(shell $(PKG_CONFIG) --libs fuse3)
# CXXFLAGS
CXXFLAGS += -Wall -Wextra -pedantic -O2 -g
=====================================
disorderfs.cpp
=====================================
@@ -24,12 +24,6 @@
#include <string>
#include <fstream>
#include <fuse.h>
-// DO NOT COMMIT
-#if 0
-extern "C" {
-#include <ulockmgr.h>
-}
-#endif
#include <dirent.h>
#include <iostream>
#include <memory>
@@ -230,7 +224,7 @@ int fuse_opt_proc (void* data, const char* arg, int key, struct fuse_args* outar
std::clog << " --reverse-dirents=yes|no reverse dirent order? (default: yes)" << std::endl;
std::clog << " --sort-dirents=yes|no sort directory entries deterministically instead (default: no)" << std::endl;
std::clog << " --pad-blocks=N add N to st_blocks (default: 1)" << std::endl;
- std::clog << " --share-locks=yes|no share locks with underlying filesystem (BUGGY; default: no)" << std::endl;
+ std::clog << " --share-locks=yes|no share locks with underlying filesystem (obsoleted, BUGGY; default: no)" << std::endl;
std::clog << std::endl;
fuse_opt_add_arg(outargs, "-ho");
fuse_main(outargs->argc, outargs->argv, &disorderfs_fuse_operations, nullptr);
@@ -275,8 +269,6 @@ int main (int argc, char** argv)
// Add some of our own hard-coded FUSE options:
fuse_opt_add_arg(&fargs, "-o");
- // DO NOT COMMIT, testing is required
- //fuse_opt_add_arg(&fargs, "atomic_o_trunc,default_permissions,use_ino"); // XXX: other mount options?
fuse_opt_add_arg(&fargs, "default_permissions"); // XXX: other mount options?
if (config.multi_user) {
fuse_opt_add_arg(&fargs, "-o");
@@ -300,19 +292,16 @@ int main (int argc, char** argv)
* Initialize disorderfs_fuse_operations
*/
-#if 0
- // DO NOT COMMIT
- /*
- * Indicate that we should accept UTIME_OMIT (and UTIME_NOW) in the
- * utimens operations for "touch -m" and "touch -a"
- */
- disorderfs_fuse_operations.flag_utime_omit_ok = 1;
-#endif
-
disorderfs_fuse_operations.getattr = [] (const char* path, struct stat* st, struct fuse_file_info *info) -> int {
Guard g;
- if (lstat((root + path).c_str(), st) == -1) {
- return -errno;
+ if (info) {
+ if (fstat(info->fh, st) == -1) {
+ return -errno;
+ }
+ } else {
+ if (lstat((root + path).c_str(), st) == -1) {
+ return -errno;
+ }
}
st->st_blocks += config.pad_blocks;
return 0;
@@ -365,7 +354,11 @@ int main (int argc, char** argv)
};
disorderfs_fuse_operations.truncate = [] (const char* path, off_t length, struct fuse_file_info* info) -> int {
Guard g;
- return wrap(truncate((root + path).c_str(), length));
+ if (info) {
+ return wrap(ftruncate(info->fh, length));
+ } else {
+ return wrap(truncate((root + path).c_str(), length));
+ }
};
disorderfs_fuse_operations.open = [] (const char* path, struct fuse_file_info* info) -> int {
Guard g;
@@ -474,7 +467,6 @@ int main (int argc, char** argv)
std::shuffle(dirents.begin(), dirents.end(), g);
}
- // DO NOT COMMIT: Is 'plus' tested?
enum fuse_fill_dir_flags fill_dir_flags = (flags == FUSE_READDIR_DEFAULTS ? FUSE_FILL_DIR_DEFAULTS : FUSE_FILL_DIR_PLUS);
for (const auto &dirent : dirents) {
st.st_ino = dirent.second;
@@ -503,26 +495,8 @@ int main (int argc, char** argv)
info->fh = fd;
return 0;
};
- disorderfs_fuse_operations.truncate = [] (const char* path, off_t off, struct fuse_file_info* info) -> int {
- return wrap(ftruncate(info->fh, off));
- };
- disorderfs_fuse_operations.getattr = [] (const char* path, struct stat* st, struct fuse_file_info* info) -> int {
- if (fstat(info->fh, st) == -1) {
- return -errno;
- }
- st->st_blocks += config.pad_blocks;
- return 0;
- };
if (config.share_locks) {
-#if 0
- // DO NOT COMMIT: ulockmgr is currently not linked in
- disorderfs_fuse_operations.lock = [] (const char* path, struct fuse_file_info* info, int cmd, struct flock* lock) -> int {
- return ulockmgr_op(info->fh, cmd, lock, &info->lock_owner, sizeof(info->lock_owner));
- };
-#endif
- disorderfs_fuse_operations.flock = [] (const char* path, struct fuse_file_info* info, int op) -> int {
- return wrap(flock(info->fh, op));
- };
+ perror_and_die("The share-locks feature is no longer provided in fuse3");
}
disorderfs_fuse_operations.utimens = [] (const char* path, const struct timespec tv[2], struct fuse_file_info *info) -> int {
Guard g;
View it on GitLab: https://salsa.debian.org/reproducible-builds/disorderfs/-/compare/a5e8ff027a7d0e23e3897e0fbee13a6f4f05c982...76042bf71b18c0f3fcd14fc6adc2c6d73dc591d7
--
View it on GitLab: https://salsa.debian.org/reproducible-builds/disorderfs/-/compare/a5e8ff027a7d0e23e3897e0fbee13a6f4f05c982...76042bf71b18c0f3fcd14fc6adc2c6d73dc591d7
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.reproducible-builds.org/pipermail/rb-commits/attachments/20260102/dd124883/attachment.htm>
More information about the rb-commits
mailing list