mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-10-26 19:01:56 -04:00
Start using std::filesystem::path for fusepath (#1522)
This commit is contained in:
parent
f64ff9ca1e
commit
8c649d33ee
139 changed files with 1711 additions and 1663 deletions
|
|
@ -26,13 +26,13 @@
|
|||
#include <pthread.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
typedef uint64_t (*inodefunc_t)(const std::string_view,
|
||||
const std::string_view,
|
||||
typedef uint64_t (*inodefunc_t)(const std::string &,
|
||||
const std::string &,
|
||||
const mode_t,
|
||||
const ino_t);
|
||||
|
||||
static uint64_t _hybrid_hash(const std::string_view,
|
||||
const std::string_view,
|
||||
static uint64_t _hybrid_hash(const std::string &,
|
||||
const std::string &,
|
||||
const mode_t,
|
||||
const ino_t);
|
||||
|
||||
|
|
@ -51,8 +51,8 @@ _h64_to_h32(uint64_t h_)
|
|||
|
||||
static
|
||||
uint64_t
|
||||
_passthrough(const std::string_view branch_path_,
|
||||
const std::string_view fusepath_,
|
||||
_passthrough(const std::string &branch_path_,
|
||||
const std::string &fusepath_,
|
||||
const mode_t mode_,
|
||||
const ino_t ino_)
|
||||
{
|
||||
|
|
@ -61,8 +61,8 @@ _passthrough(const std::string_view branch_path_,
|
|||
|
||||
static
|
||||
uint64_t
|
||||
_path_hash(const std::string_view branch_path_,
|
||||
const std::string_view fusepath_,
|
||||
_path_hash(const std::string &branch_path_,
|
||||
const std::string &fusepath_,
|
||||
const mode_t mode_,
|
||||
const ino_t ino_)
|
||||
{
|
||||
|
|
@ -75,8 +75,8 @@ _path_hash(const std::string_view branch_path_,
|
|||
|
||||
static
|
||||
uint64_t
|
||||
_path_hash32(const std::string_view branch_path_,
|
||||
const std::string_view fusepath_,
|
||||
_path_hash32(const std::string &branch_path_,
|
||||
const std::string &fusepath_,
|
||||
const mode_t mode_,
|
||||
const ino_t ino_)
|
||||
{
|
||||
|
|
@ -92,8 +92,8 @@ _path_hash32(const std::string_view branch_path_,
|
|||
|
||||
static
|
||||
uint64_t
|
||||
_devino_hash(const std::string_view branch_path_,
|
||||
const std::string_view fusepath_,
|
||||
_devino_hash(const std::string &branch_path_,
|
||||
const std::string &fusepath_,
|
||||
const mode_t mode_,
|
||||
const ino_t ino_)
|
||||
{
|
||||
|
|
@ -107,8 +107,8 @@ _devino_hash(const std::string_view branch_path_,
|
|||
|
||||
static
|
||||
uint64_t
|
||||
_devino_hash32(const std::string_view branch_path_,
|
||||
const std::string_view fusepath_,
|
||||
_devino_hash32(const std::string &branch_path_,
|
||||
const std::string &fusepath_,
|
||||
const mode_t mode_,
|
||||
const ino_t ino_)
|
||||
{
|
||||
|
|
@ -124,8 +124,8 @@ _devino_hash32(const std::string_view branch_path_,
|
|||
|
||||
static
|
||||
uint64_t
|
||||
_hybrid_hash(const std::string_view branch_path_,
|
||||
const std::string_view fusepath_,
|
||||
_hybrid_hash(const std::string &branch_path_,
|
||||
const std::string &fusepath_,
|
||||
const mode_t mode_,
|
||||
const ino_t ino_)
|
||||
{
|
||||
|
|
@ -136,8 +136,8 @@ _hybrid_hash(const std::string_view branch_path_,
|
|||
|
||||
static
|
||||
uint64_t
|
||||
_hybrid_hash32(const std::string_view branch_path_,
|
||||
const std::string_view fusepath_,
|
||||
_hybrid_hash32(const std::string &branch_path_,
|
||||
const std::string &fusepath_,
|
||||
const mode_t mode_,
|
||||
const ino_t ino_)
|
||||
{
|
||||
|
|
@ -147,7 +147,7 @@ _hybrid_hash32(const std::string_view branch_path_,
|
|||
}
|
||||
|
||||
int
|
||||
fs::inode::set_algo(const std::string_view algo_)
|
||||
fs::inode::set_algo(const std::string &algo_)
|
||||
{
|
||||
if(algo_ == "passthrough")
|
||||
g_func = ::_passthrough;
|
||||
|
|
@ -191,18 +191,18 @@ fs::inode::get_algo(void)
|
|||
}
|
||||
|
||||
uint64_t
|
||||
fs::inode::calc(const std::string_view branch_path_,
|
||||
const std::string_view fusepath_,
|
||||
const mode_t mode_,
|
||||
const ino_t ino_)
|
||||
fs::inode::calc(const std::string &branch_path_,
|
||||
const std::string &fusepath_,
|
||||
const mode_t mode_,
|
||||
const ino_t ino_)
|
||||
{
|
||||
return g_func(branch_path_,fusepath_,mode_,ino_);
|
||||
}
|
||||
|
||||
void
|
||||
fs::inode::calc(const std::string_view branch_path_,
|
||||
const std::string_view fusepath_,
|
||||
struct stat *st_)
|
||||
fs::inode::calc(const std::string &branch_path_,
|
||||
const std::string &fusepath_,
|
||||
struct stat *st_)
|
||||
{
|
||||
st_->st_ino = calc(branch_path_,
|
||||
fusepath_,
|
||||
|
|
@ -211,9 +211,9 @@ fs::inode::calc(const std::string_view branch_path_,
|
|||
}
|
||||
|
||||
void
|
||||
fs::inode::calc(const std::string_view branch_path_,
|
||||
const std::string_view fusepath_,
|
||||
struct fuse_statx *st_)
|
||||
fs::inode::calc(const std::string &branch_path_,
|
||||
const std::string &fusepath_,
|
||||
struct fuse_statx *st_)
|
||||
{
|
||||
st_->ino = calc(branch_path_,
|
||||
fusepath_,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue