add EDQUOT to errors which trigger moveonenospc

This commit is contained in:
Antonio SJ Musumeci 2016-10-06 13:54:57 -04:00
parent abc4ed4d9f
commit 3fb7f8919a
4 changed files with 23 additions and 7 deletions

View file

@ -25,6 +25,14 @@
#include "rwlock.hpp"
#include "ugid.hpp"
static
bool
_out_of_space(const int error)
{
return ((error == ENOSPC) ||
(error == EDQUOT));
}
static
int
_write(const int fd,
@ -54,7 +62,7 @@ namespace mergerfs
FileInfo* fi = reinterpret_cast<FileInfo*>(ffi->fh);
rv = _write(fi->fd,buf,count,offset);
if(rv == -ENOSPC)
if(_out_of_space(-rv))
{
const fuse_context *fc = fuse_get_context();
const Config &config = Config::get(fc);