use temp files (then rename) when moving files for moveonenospc

This commit is contained in:
Antonio SJ Musumeci 2017-06-28 21:17:47 -04:00
parent fa3ff40218
commit aea2b40dda
4 changed files with 86 additions and 7 deletions

View file

@ -218,6 +218,13 @@ namespace fs
return ::fcntl(fd,F_GETFL,0);
}
int
setfl(const int fd,
const mode_t mode)
{
return ::fcntl(fd,F_SETFL,mode);
}
int
mfs(const vector<string> &basepaths,
const uint64_t minfreespace,