mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-12-04 05:40:13 -05:00
Rework policies to return branches rather than path strings
This commit is contained in:
parent
7e084ea7db
commit
86b50d2d4e
86 changed files with 1259 additions and 3088 deletions
|
|
@ -17,29 +17,43 @@
|
|||
#pragma once
|
||||
|
||||
#include "fh.hpp"
|
||||
#include "branch.hpp"
|
||||
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <mutex>
|
||||
|
||||
#include "int_types.h"
|
||||
|
||||
|
||||
class FileInfo : public FH
|
||||
{
|
||||
public:
|
||||
FileInfo(const int fd_,
|
||||
const std::string branchpath_,
|
||||
const char *fusepath_,
|
||||
const bool direct_io_)
|
||||
FileInfo(const int fd_,
|
||||
const Branch &branch_,
|
||||
const char *fusepath_,
|
||||
const bool direct_io_)
|
||||
: FH(fusepath_),
|
||||
fd(fd_),
|
||||
branchpath(std::move(branchpath_)),
|
||||
branch(branch_),
|
||||
direct_io(direct_io_)
|
||||
{
|
||||
}
|
||||
|
||||
FileInfo(const int fd_,
|
||||
const Branch *branch_,
|
||||
const char *fusepath_,
|
||||
const bool direct_io_)
|
||||
: FH(fusepath_),
|
||||
fd(fd_),
|
||||
branch(*branch_),
|
||||
direct_io(direct_io_)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
public:
|
||||
int fd;
|
||||
std::string branchpath;
|
||||
uint32_t direct_io:1;
|
||||
Branch branch;
|
||||
u32 direct_io:1;
|
||||
std::mutex mutex;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue