mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-11-29 03:16:56 -05:00
Misc cleanup
This commit is contained in:
parent
e310d24615
commit
23824eaeb4
16 changed files with 24 additions and 83 deletions
|
|
@ -26,12 +26,12 @@
|
|||
|
||||
#include <functional>
|
||||
#include <thread>
|
||||
#include <unordered_set>
|
||||
#include <set>
|
||||
|
||||
|
||||
namespace fs
|
||||
{
|
||||
typedef std::unordered_set<fs::Path> PathSet;
|
||||
typedef std::set<fs::Path> PathSet;
|
||||
}
|
||||
|
||||
constexpr std::chrono::milliseconds SLEEP_DURATION = std::chrono::milliseconds(333);
|
||||
|
|
@ -99,9 +99,9 @@ _wait_for_mount(const struct stat &src_st_,
|
|||
const std::chrono::milliseconds &timeout_)
|
||||
{
|
||||
bool first_loop;
|
||||
fs::PathVector successes;
|
||||
fs::PathVector failures;
|
||||
std::unordered_set<fs::Path> tgt_paths;
|
||||
fs::PathVector successes;
|
||||
fs::PathVector failures;
|
||||
fs::PathSet tgt_paths;
|
||||
std::chrono::time_point<std::chrono::steady_clock> now;
|
||||
std::chrono::time_point<std::chrono::steady_clock> deadline;
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ _set_stat_if_leads_to_dir(const std::string &path_,
|
|||
int rv;
|
||||
struct fuse_statx st;
|
||||
|
||||
rv = fs::statx(AT_FDCWD,path_,AT_SYMLINK_FOLLOW,STATX_TYPE,st_);
|
||||
rv = fs::statx(AT_FDCWD,path_,AT_SYMLINK_FOLLOW,STATX_TYPE,&st);
|
||||
if(rv < 0)
|
||||
return;
|
||||
|
||||
|
|
@ -42,7 +42,7 @@ _set_stat_if_leads_to_reg(const std::string &path_,
|
|||
int rv;
|
||||
struct fuse_statx st;
|
||||
|
||||
rv = fs::statx(AT_FDCWD,path_,AT_SYMLINK_FOLLOW,STATX_TYPE,st_);
|
||||
rv = fs::statx(AT_FDCWD,path_,AT_SYMLINK_FOLLOW,STATX_TYPE,&st);
|
||||
if(rv < 0)
|
||||
return;
|
||||
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ namespace mspmfs
|
|||
fs::info_t info;
|
||||
Branch *obranch;
|
||||
|
||||
obranch = nullptr;
|
||||
mfs = std::numeric_limits<uint64_t>::min();
|
||||
for(auto &branch : *branches_)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue