mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-10-26 19:01:56 -04:00
NFS open/creat hack
A hack to work around non-POSIX NFS <-> FUSE behavior where it turns an open(O_EXCL|O_CREAT,0444) into multiple calls that results in EACCES.
This commit is contained in:
parent
5a0568495b
commit
93218a343a
12 changed files with 280 additions and 18 deletions
|
|
@ -25,14 +25,14 @@
|
|||
#include "fs_base_stat.hpp"
|
||||
#include "fs_base_unlink.hpp"
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <string>
|
||||
|
||||
using std::string;
|
||||
|
||||
static
|
||||
|
|
@ -63,7 +63,12 @@ namespace fs
|
|||
bool
|
||||
is_eligible(const int flags_)
|
||||
{
|
||||
return ((flags_ & O_RDWR) || (flags_ & O_WRONLY));
|
||||
int accmode;
|
||||
|
||||
accmode = (flags_ & O_ACCMODE);
|
||||
|
||||
return ((accmode == O_RDWR) ||
|
||||
(accmode == O_WRONLY));
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue