mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-11-25 09:26:25 -05:00
create different policies based on category of use
This commit is contained in:
parent
51b6d3f647
commit
0c60701b29
23 changed files with 589 additions and 290 deletions
|
|
@ -69,16 +69,17 @@ _mknod(Policy::Func::Search searchFunc,
|
|||
return -errno;
|
||||
|
||||
error = 0;
|
||||
for(Paths::const_iterator
|
||||
i = createpaths.begin(), ei = createpaths.end(); i != ei; ++i)
|
||||
for(size_t i = 0, ei = createpaths.size(); i != ei; i++)
|
||||
{
|
||||
if(i->base != existingpath[0].base)
|
||||
const string &createpath = createpaths[0].base;
|
||||
|
||||
if(createpath != existingpath[0].base)
|
||||
{
|
||||
const mergerfs::ugid::SetResetGuard ugid(0,0);
|
||||
fs::clonepath(existingpath[0].base,i->base,dirname);
|
||||
fs::clonepath(existingpath[0].base,createpath,dirname);
|
||||
}
|
||||
|
||||
fullpath = fs::make_path(i->base,fusepath);
|
||||
fullpath = fs::make_path(createpath,fusepath);
|
||||
|
||||
rv = ::mknod(fullpath.c_str(),mode,dev);
|
||||
if(rv == -1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue