mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-11-26 01:46:31 -05:00
move size calculations to use uint64_t. fixes #287
This commit is contained in:
parent
30cdfa64b8
commit
43cbd9c670
42 changed files with 143 additions and 151 deletions
|
|
@ -26,27 +26,26 @@
|
|||
|
||||
using std::string;
|
||||
using std::vector;
|
||||
using std::size_t;
|
||||
using mergerfs::Category;
|
||||
|
||||
static
|
||||
int
|
||||
_eplfs_create(const vector<string> &basepaths,
|
||||
const char *fusepath,
|
||||
const size_t minfreespace,
|
||||
const uint64_t minfreespace,
|
||||
vector<const string*> &paths)
|
||||
{
|
||||
string fullpath;
|
||||
size_t eplfs;
|
||||
uint64_t eplfs;
|
||||
const string *eplfsbasepath;
|
||||
|
||||
eplfs = std::numeric_limits<size_t>::max();
|
||||
eplfs = std::numeric_limits<uint64_t>::max();
|
||||
eplfsbasepath = NULL;
|
||||
for(size_t i = 0, ei = basepaths.size(); i != ei; i++)
|
||||
{
|
||||
bool readonly;
|
||||
size_t spaceavail;
|
||||
size_t _spaceused;
|
||||
uint64_t spaceavail;
|
||||
uint64_t _spaceused;
|
||||
const string *basepath = &basepaths[i];
|
||||
|
||||
fs::path::make(basepath,fusepath,fullpath);
|
||||
|
|
@ -81,14 +80,14 @@ _eplfs_other(const vector<string> &basepaths,
|
|||
vector<const string*> &paths)
|
||||
{
|
||||
string fullpath;
|
||||
size_t eplfs;
|
||||
uint64_t eplfs;
|
||||
const string *eplfsbasepath;
|
||||
|
||||
eplfs = std::numeric_limits<size_t>::max();
|
||||
eplfs = std::numeric_limits<uint64_t>::max();
|
||||
eplfsbasepath = NULL;
|
||||
for(size_t i = 0, ei = basepaths.size(); i != ei; i++)
|
||||
{
|
||||
size_t spaceavail;
|
||||
uint64_t spaceavail;
|
||||
const string *basepath = &basepaths[i];
|
||||
|
||||
fs::path::make(basepath,fusepath,fullpath);
|
||||
|
|
@ -117,7 +116,7 @@ int
|
|||
_eplfs(const Category::Enum::Type type,
|
||||
const vector<string> &basepaths,
|
||||
const char *fusepath,
|
||||
const size_t minfreespace,
|
||||
const uint64_t minfreespace,
|
||||
vector<const string*> &paths)
|
||||
{
|
||||
if(type == Category::Enum::create)
|
||||
|
|
@ -132,7 +131,7 @@ namespace mergerfs
|
|||
Policy::Func::eplfs(const Category::Enum::Type type,
|
||||
const vector<string> &basepaths,
|
||||
const char *fusepath,
|
||||
const size_t minfreespace,
|
||||
const uint64_t minfreespace,
|
||||
vector<const string*> &paths)
|
||||
{
|
||||
int rv;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue