mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-10-26 19:01:56 -04:00
add EDQUOT to errors which trigger moveonenospc
This commit is contained in:
parent
abc4ed4d9f
commit
3fb7f8919a
4 changed files with 23 additions and 7 deletions
|
|
@ -37,6 +37,14 @@ using std::string;
|
|||
using std::vector;
|
||||
using namespace mergerfs;
|
||||
|
||||
static
|
||||
bool
|
||||
_out_of_space(const int error)
|
||||
{
|
||||
return ((error == ENOSPC) ||
|
||||
(error == EDQUOT));
|
||||
}
|
||||
|
||||
static
|
||||
int
|
||||
_write_buf(const int fd,
|
||||
|
|
@ -69,8 +77,8 @@ namespace mergerfs
|
|||
FileInfo *fi = reinterpret_cast<FileInfo*>(ffi->fh);
|
||||
|
||||
rv = _write_buf(fi->fd,*src,offset);
|
||||
if(rv == -ENOSPC)
|
||||
{
|
||||
if(_out_of_space(-rv))
|
||||
{
|
||||
const fuse_context *fc = fuse_get_context();
|
||||
const Config &config = Config::get(fc);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue