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
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue