Rework policies to return branches rather than path strings

This commit is contained in:
trapexit 2025-05-17 16:35:18 -05:00 • committed by GitHub
parent 7e084ea7db
commit 86b50d2d4e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
86 changed files with 1259 additions and 3088 deletions

View file

@ -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;
};