mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-10-26 19:01:56 -04:00
Auto-commit fuse.cpp
This commit is contained in:
parent
d5a2187713
commit
02da8efbff
37 changed files with 374 additions and 267 deletions
|
|
@ -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))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue