mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-11-30 20:06:52 -05:00
Add support for FUSE passthrough
This commit is contained in:
parent
92312c8507
commit
e310d24615
412 changed files with 43707 additions and 17432 deletions
35
src/state.hpp
Normal file
35
src/state.hpp
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
#pragma once
|
||||
|
||||
#include "boost/unordered/concurrent_flat_map.hpp"
|
||||
|
||||
#include "fileinfo.hpp"
|
||||
|
||||
|
||||
constexpr int INVALID_BACKING_ID = -1;
|
||||
|
||||
class State
|
||||
{
|
||||
public:
|
||||
struct OpenFile
|
||||
{
|
||||
OpenFile()
|
||||
: ref_count(0),
|
||||
backing_id(INVALID_BACKING_ID),
|
||||
fi(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
int ref_count;
|
||||
int backing_id;
|
||||
FileInfo *fi;
|
||||
};
|
||||
|
||||
|
||||
public:
|
||||
using OpenFileMap = boost::concurrent_flat_map<u64,OpenFile>;
|
||||
|
||||
public:
|
||||
OpenFileMap open_files;
|
||||
};
|
||||
|
||||
extern State state;
|
||||
Loading…
Add table
Add a link
Reference in a new issue