mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-10-26 19:01:56 -04:00
revert removal of 'all' policy and relevant behavior. closes #54
This commit is contained in:
parent
a359c88173
commit
c022741ffb
28 changed files with 454 additions and 225 deletions
|
|
@ -256,7 +256,7 @@ _setxattr_controlfile(config::Config &config,
|
|||
|
||||
static
|
||||
int
|
||||
_setxattr(const fs::SearchFunc searchFunc,
|
||||
_setxattr(const fs::find::Func actionFunc,
|
||||
const vector<string> &srcmounts,
|
||||
const string &fusepath,
|
||||
const char *attrname,
|
||||
|
|
@ -266,15 +266,23 @@ _setxattr(const fs::SearchFunc searchFunc,
|
|||
{
|
||||
#ifndef WITHOUT_XATTR
|
||||
int rv;
|
||||
fs::Path path;
|
||||
int error;
|
||||
fs::Paths paths;
|
||||
|
||||
rv = searchFunc(srcmounts,fusepath,path);
|
||||
rv = actionFunc(srcmounts,fusepath,paths,-1);
|
||||
if(rv == -1)
|
||||
return -errno;
|
||||
|
||||
rv = ::lsetxattr(path.full.c_str(),attrname,attrval,attrvalsize,flags);
|
||||
error = 0;
|
||||
for(fs::Paths::const_iterator
|
||||
i = paths.begin(), ei = paths.end(); i != ei; ++i)
|
||||
{
|
||||
rv = ::lsetxattr(i->full.c_str(),attrname,attrval,attrvalsize,flags);
|
||||
if(rv == -1)
|
||||
error = errno;
|
||||
}
|
||||
|
||||
return ((rv == -1) ? -errno : 0);
|
||||
return -error;
|
||||
#else
|
||||
return -ENOTSUP;
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue