From 46131086e1003745c66feeb529948b8d4b39e8de Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Sat, 16 May 2026 13:11:20 +0900 Subject: [PATCH] Linux/FUSE: honor inodes and map unknown errors to EIO Enable use_ino for Linux FUSE mounts so stable inode numbers returned by getattr and readdir are reported to userspace. For FUSE3, set fuse_config.use_ino from init; for FUSE2, pass -o use_ino because there is no fuse_config init hook. Also map otherwise unhandled FUSE exceptions to EIO instead of EINTR, since these failures are not signal interruptions and should not encourage retry loops. --- src/Driver/Fuse/FuseService.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/Driver/Fuse/FuseService.cpp b/src/Driver/Fuse/FuseService.cpp index 578fbee8..c0962211 100644 --- a/src/Driver/Fuse/FuseService.cpp +++ b/src/Driver/Fuse/FuseService.cpp @@ -150,6 +150,8 @@ namespace VeraCrypt cfg->set_gid = 1; cfg->uid = FuseService::GetUserId(); cfg->gid = FuseService::GetGroupId(); + + cfg->use_ino = 1; } return fuse_service_init_common (); @@ -582,12 +584,12 @@ namespace VeraCrypt catch (std::exception &e) { SystemLog::WriteException (e); - return -EINTR; + return -EIO; } catch (...) { SystemLog::WriteException (UnknownException (SRC_POS)); - return -EINTR; + return -EIO; } } @@ -677,6 +679,12 @@ namespace VeraCrypt args.push_back ("allow_other"); } +#if defined(TC_LINUX) && !defined(VC_FUSE3) + // FUSE2 has no fuse_config init hook; pass the mount option instead. + args.push_back ("-o"); + args.push_back ("use_ino"); +#endif + ExecFunctor execFunctor (openVolume, slotNumber); Process::Execute ("fuse", args, -1, &execFunctor);