idmap mount support (#1523)
Some checks failed
CodeQL / Analyze (push) Has been cancelled
mkdocs / deploy (push) Has been cancelled

* Add idmap mount support

* Further replacement of std::filesystem::path to fs::path

* Update docs regarding idmap support
This commit is contained in:
trapexit 2025-09-18 01:07:28 -04:00 • committed by GitHub
parent 8c649d33ee
commit ca59ae53a5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 73 additions and 49 deletions

View file

@ -206,6 +206,7 @@ FUSE::init(fuse_conn_info *conn_)
::_want_if_capable(conn_,FUSE_CAP_POSIX_ACL,&cfg.posix_acl);
::_want_if_capable(conn_,FUSE_CAP_READDIR_PLUS,&cfg.readdirplus);
::_want_if_capable(conn_,FUSE_CAP_WRITEBACK_CACHE,&cfg.writeback_cache);
::_want_if_capable(conn_,FUSE_CAP_ALLOW_IDMAP);
// ::_want_if_capable(conn_,FUSE_CAP_READDIR_PLUS_AUTO);
::_want_if_capable_max_pages(conn_,cfg);
conn_->want &= ~FUSE_CAP_POSIX_LOCKS;

View file

@ -362,7 +362,7 @@ int
_pick_app_and_run(int argc_,
char **argv_)
{
std::filesystem::path appname;
fs::path appname;
appname = argv_[0];
appname = appname.filename();

View file

@ -64,9 +64,9 @@ namespace Policy
}
int
operator()(const Branches::Ptr &branches_,
const std::filesystem::path &fusepath_,
std::vector<Branch*> &output_) const
operator()(const Branches::Ptr &branches_,
const fs::path &fusepath_,
std::vector<Branch*> &output_) const
{
return (*impl)(branches_,fusepath_,output_);
}
@ -92,7 +92,7 @@ namespace Policy
std::string name;
virtual bool path_preserving(void) const = 0;
virtual int operator()(const Branches::Ptr&,
const std::filesystem::path&,
const fs::path&,
std::vector<Branch*>&) const = 0;
};
@ -124,9 +124,9 @@ namespace Policy
}
int
operator()(const Branches::Ptr &branches_,
const std::filesystem::path &fusepath_,
std::vector<Branch*> &output_) const
operator()(const Branches::Ptr &branches_,
const fs::path &fusepath_,
std::vector<Branch*> &output_) const
{
return (*impl)(branches_,fusepath_,output_);
}
@ -151,7 +151,7 @@ namespace Policy
public:
std::string name;
virtual int operator()(const Branches::Ptr&,
const std::filesystem::path&,
const fs::path&,
std::vector<Branch*>&) const = 0;
};
@ -178,7 +178,7 @@ namespace Policy
int
operator()(const Branches::Ptr &branches_,
const std::filesystem::path &fusepath_,
const fs::path &fusepath_,
std::vector<Branch*> &output_) const
{
return (*impl)(branches_,fusepath_,output_);

View file

@ -33,7 +33,7 @@ namespace Policy
public:
int operator()(const Branches::Ptr&,
const std::filesystem::path&,
const fs::path&,
std::vector<Branch*>&) const final;
};
@ -46,7 +46,7 @@ namespace Policy
public:
int operator()(const Branches::Ptr&,
const std::filesystem::path&,
const fs::path&,
std::vector<Branch*>&) const final;
bool path_preserving(void) const final { return false; }
};
@ -60,7 +60,7 @@ namespace Policy
public:
int operator()(const Branches::Ptr&,
const std::filesystem::path&,
const fs::path&,
std::vector<Branch*>&) const final;
};
}

View file

@ -34,7 +34,7 @@ namespace Policy
public:
int operator()(const Branches::Ptr&,
const std::filesystem::path&,
const fs::path&,
std::vector<Branch*>&) const final;
};
@ -48,7 +48,7 @@ namespace Policy
public:
int operator()(const Branches::Ptr&,
const std::filesystem::path&,
const fs::path&,
std::vector<Branch*>&) const final;
bool path_preserving(void) const final { return true; }
};
@ -63,7 +63,7 @@ namespace Policy
public:
int operator()(const Branches::Ptr&,
const std::filesystem::path&,
const fs::path&,
std::vector<Branch*>&) const final;
};
}

View file

@ -33,7 +33,7 @@ namespace Policy
public:
int operator()(const Branches::Ptr&,
const std::filesystem::path&,
const fs::path&,
std::vector<Branch*>&) const final;
};
@ -46,7 +46,7 @@ namespace Policy
public:
int operator()(const Branches::Ptr&,
const std::filesystem::path&,
const fs::path&,
std::vector<Branch*>&) const final;
bool path_preserving(void) const final { return true; }
};
@ -60,7 +60,7 @@ namespace Policy
public:
int operator()(const Branches::Ptr&,
const std::filesystem::path&,
const fs::path&,
std::vector<Branch*>&) const final;
};
}

View file

@ -33,7 +33,7 @@ namespace Policy
public:
int operator()(const Branches::Ptr&,
const std::filesystem::path&,
const fs::path&,
std::vector<Branch*>&) const final;
};
@ -46,7 +46,7 @@ namespace Policy
public:
int operator()(const Branches::Ptr&,
const std::filesystem::path&,
const fs::path&,
std::vector<Branch*>&) const final;
bool path_preserving(void) const final { return true; }
};
@ -60,7 +60,7 @@ namespace Policy
public:
int operator()(const Branches::Ptr&,
const std::filesystem::path&,
const fs::path&,
std::vector<Branch*>&) const final;
};
}

View file

@ -33,7 +33,7 @@ namespace Policy
public:
int operator()(const Branches::Ptr&,
const std::filesystem::path&,
const fs::path&,
std::vector<Branch*>&) const final;
};
@ -46,7 +46,7 @@ namespace Policy
public:
int operator()(const Branches::Ptr&,
const std::filesystem::path&,
const fs::path&,
std::vector<Branch*>&) const final;
bool path_preserving(void) const final { return true; }
};
@ -60,7 +60,7 @@ namespace Policy
public:
int operator()(const Branches::Ptr&,
const std::filesystem::path&,
const fs::path&,
std::vector<Branch*>&) const final;
};
}

View file

@ -34,7 +34,7 @@ namespace Policy
public:
int operator()(const Branches::Ptr&,
const std::filesystem::path&,
const fs::path&,
std::vector<Branch*>&) const final;
};
@ -48,7 +48,7 @@ namespace Policy
public:
int operator()(const Branches::Ptr&,
const std::filesystem::path&,
const fs::path&,
std::vector<Branch*>&) const final;
bool path_preserving(void) const final { return true; }
};
@ -63,7 +63,7 @@ namespace Policy
public:
int operator()(const Branches::Ptr&,
const std::filesystem::path&,
const fs::path&,
std::vector<Branch*>&) const final;
};
}

View file

@ -33,7 +33,7 @@ namespace Policy
public:
int operator()(const Branches::Ptr&,
const std::filesystem::path&,
const fs::path&,
std::vector<Branch*>&) const final;
};
@ -46,7 +46,7 @@ namespace Policy
public:
int operator()(const Branches::Ptr&,
const std::filesystem::path&,
const fs::path&,
std::vector<Branch*>&) const final;
bool path_preserving(void) const final { return true; }
};
@ -60,7 +60,7 @@ namespace Policy
public:
int operator()(const Branches::Ptr&,
const std::filesystem::path&,
const fs::path&,
std::vector<Branch*>&) const final;
};
}

View file

@ -33,7 +33,7 @@ namespace Policy
public:
int operator()(const Branches::Ptr&,
const std::filesystem::path&,
const fs::path&,
std::vector<Branch*>&) const final;
};
@ -46,7 +46,7 @@ namespace Policy
public:
int operator()(const Branches::Ptr&,
const std::filesystem::path&,
const fs::path&,
std::vector<Branch*>&) const final;
bool path_preserving(void) const final { return true; }
};
@ -60,7 +60,7 @@ namespace Policy
public:
int operator()(const Branches::Ptr&,
const std::filesystem::path&,
const fs::path&,
std::vector<Branch*>&) const final;
};
}

View file

@ -33,7 +33,7 @@ namespace Policy
public:
int operator()(const Branches::Ptr&,
const std::filesystem::path&,
const fs::path&,
std::vector<Branch*>&) const final;
};
@ -46,7 +46,7 @@ namespace Policy
public:
int operator()(const Branches::Ptr&,
const std::filesystem::path&,
const fs::path&,
std::vector<Branch*>&) const final;
bool path_preserving(void) const final { return false; }
};
@ -60,7 +60,7 @@ namespace Policy
public:
int operator()(const Branches::Ptr&,
const std::filesystem::path&,
const fs::path&,
std::vector<Branch*>&) const final;
};
}

View file

@ -33,7 +33,7 @@ namespace Policy
public:
int operator()(const Branches::Ptr&,
const std::filesystem::path&,
const fs::path&,
std::vector<Branch*>&) const final;
};
@ -47,7 +47,7 @@ namespace Policy
public:
bool path_preserving(void) const final { return false; }
int operator()(const Branches::Ptr&,
const std::filesystem::path&,
const fs::path&,
std::vector<Branch*>&) const final;
};
@ -61,7 +61,7 @@ namespace Policy
public:
int operator()(const Branches::Ptr&,
const std::filesystem::path&,
const fs::path&,
std::vector<Branch*>&) const final;
};
}

View file

@ -33,7 +33,7 @@ namespace Policy
public:
int operator()(const Branches::Ptr&,
const std::filesystem::path&,
const fs::path&,
std::vector<Branch*>&) const final;
};
@ -46,7 +46,7 @@ namespace Policy
public:
int operator()(const Branches::Ptr&,
const std::filesystem::path&,
const fs::path&,
std::vector<Branch*>&) const final;
bool path_preserving() const final { return false; }
};
@ -60,7 +60,7 @@ namespace Policy
public:
int operator()(const Branches::Ptr&,
const std::filesystem::path&,
const fs::path&,
std::vector<Branch*>&) const final;
};
}

View file

@ -33,7 +33,7 @@ namespace Policy
public:
int operator()(const Branches::Ptr&,
const std::filesystem::path&,
const fs::path&,
std::vector<Branch*>&) const final;
};
@ -46,7 +46,7 @@ namespace Policy
public:
int operator()(const Branches::Ptr&,
const std::filesystem::path&,
const fs::path&,
std::vector<Branch*>&) const final;
bool path_preserving() const final { return false; }
};
@ -60,7 +60,7 @@ namespace Policy
public:
int operator()(const Branches::Ptr&,
const std::filesystem::path&,
const fs::path&,
std::vector<Branch*>&) const final;
};
}

View file

@ -55,7 +55,7 @@ str::to(const std::string &s_)
}
std::string
str::to(const std::filesystem::path &path_)
str::to(const fs::path &path_)
{
return path_.string();
}

View file

@ -18,6 +18,8 @@
#pragma once
#include "fs_path.hpp"
#include <cstdint>
#include <filesystem>
#include <string>
@ -30,5 +32,5 @@ namespace str
std::string to(const uint64_t);
std::string to(const int64_t);
std::string to(const std::string&);
std::string to(const std::filesystem::path&);
std::string to(const fs::path&);
}