Auto-commit fuse.cpp

This commit is contained in:
Antonio SJ Musumeci 2026-04-13 18:55:56 -05:00
parent d5a2187713
commit 02da8efbff
37 changed files with 374 additions and 267 deletions

View file

@ -25,9 +25,9 @@
simultaneously attempt to open the same file (same nodeid), and we
need to:
1. Share a single canonical FileInfo entry in the open_files map for all
opens of the same file while still giving each FUSE handle its own
FileInfo object and file descriptor
1. Share a single canonical FileInfo entry in the open_files map for
all opens of the same file while still giving each FUSE handle
its own FileInfo object and file descriptor
2. Properly reference count to know when to release resources
3. Handle race conditions without deadlocks or resource leaks
4. Support FUSE passthrough mode for performance
@ -45,8 +45,8 @@
FileInfo by re-opening the canonical file descriptor
3. If it doesn't exist, we create a new FileInfo and try to insert it
4. If insertion fails (another thread inserted first), we clean up
and retry (because to use passthrough it MUST be the same underlying
file as the backing id was created)
and retry (because to use passthrough it MUST be the same
underlying file as the backing id was created)
THE RETRY LOOP
--------------
@ -423,6 +423,8 @@ _open(const fuse_req_ctx_t *ctx_,
return rv;
fi = FileInfo::from_fh(ffi_->fh);
if(not fi)
return -EBADF;
switch(_(cfg.passthrough_io,ffi_->flags))
{