mirror of https://github.com/trapexit/mergerfs.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
481 B
35 lines
481 B
#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;
|