mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-11-20 06:56:27 -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
|
||||
_eplus_create(const vector<string> &basepaths,
|
||||
const char *fusepath,
|
||||
const size_t minfreespace,
|
||||
const uint64_t minfreespace,
|
||||
vector<const string*> &paths)
|
||||
{
|
||||
string fullpath;
|
||||
size_t eplus;
|
||||
uint64_t eplus;
|
||||
const string *eplusbasepath;
|
||||
|
||||
eplus = std::numeric_limits<size_t>::max();
|
||||
eplus = std::numeric_limits<uint64_t>::max();
|
||||
eplusbasepath = 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 @@ _eplus_other(const vector<string> &basepaths,
|
|||
vector<const string*> &paths)
|
||||
{
|
||||
string fullpath;
|
||||
size_t eplus;
|
||||
uint64_t eplus;
|
||||
const string *eplusbasepath;
|
||||
|
||||
eplus = 0;
|
||||
eplusbasepath = NULL;
|
||||
for(size_t i = 0, ei = basepaths.size(); i != ei; i++)
|
||||
{
|
||||
size_t spaceused;
|
||||
uint64_t spaceused;
|
||||
const string *basepath = &basepaths[i];
|
||||
|
||||
fs::path::make(basepath,fusepath,fullpath);
|
||||
|
|
@ -117,7 +116,7 @@ int
|
|||
_eplus(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,8 +131,8 @@ namespace mergerfs
|
|||
Policy::Func::eplus(const Category::Enum::Type type,
|
||||
const vector<string> &basepaths,
|
||||
const char *fusepath,
|
||||
const size_t minfreespace,
|
||||
vector<const string*> &paths)
|
||||
const uint64_t minfreespace,
|
||||
vector<const string*> &paths)
|
||||
{
|
||||
int rv;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue