Skip to content

Commit

Permalink
Merge pull request #10108: jewel: fuse mounted file systems fails SAM…
Browse files Browse the repository at this point in the history
…BA CTDB ping_pong rw test with v9.0.2

Reviewed-by: Loic Dachary <ldachary@redhat.com>
  • Loading branch information
Loic Dachary committed Aug 17, 2016
2 parents 8f9abf8 + fd7ff96 commit 46c9d24
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
10 changes: 9 additions & 1 deletion src/client/fuse_ll.cc
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,9 @@ static void fuse_ll_open(fuse_req_t req, fuse_ino_t ino,
if (r == 0) {
fi->fh = (long)fh;
#if FUSE_VERSION >= FUSE_MAKE_VERSION(2, 8)
if (cfuse->client->cct->_conf->fuse_use_invalidate_cb)
if (cfuse->client->cct->_conf->fuse_disable_pagecache)
fi->direct_io = 1;
else if (cfuse->client->cct->_conf->fuse_use_invalidate_cb)
fi->keep_cache = 1;
#endif
fuse_reply_open(req, fi);
Expand Down Expand Up @@ -673,6 +675,12 @@ static void fuse_ll_create(fuse_req_t req, fuse_ino_t parent, const char *name,
if (r == 0) {
fi->fh = (long)fh;
fe.ino = cfuse->make_fake_ino(fe.attr.st_ino, fe.attr.st_dev);
#if FUSE_VERSION >= FUSE_MAKE_VERSION(2, 8)
if (cfuse->client->cct->_conf->fuse_disable_pagecache)
fi->direct_io = 1;
else if (cfuse->client->cct->_conf->fuse_use_invalidate_cb)
fi->keep_cache = 1;
#endif
fuse_reply_create(req, &fe, fi);
} else
fuse_reply_err(req, -r);
Expand Down
3 changes: 2 additions & 1 deletion src/common/config_opts.h
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,8 @@ OPTION(client_permissions, OPT_BOOL, true)
OPTION(client_dirsize_rbytes, OPT_BOOL, true)

// note: the max amount of "in flight" dirty data is roughly (max - target)
OPTION(fuse_use_invalidate_cb, OPT_BOOL, false) // use fuse 2.8+ invalidate callback to keep page cache consistent
OPTION(fuse_use_invalidate_cb, OPT_BOOL, true) // use fuse 2.8+ invalidate callback to keep page cache consistent
OPTION(fuse_disable_pagecache, OPT_BOOL, false)
OPTION(fuse_allow_other, OPT_BOOL, true)
OPTION(fuse_default_permissions, OPT_BOOL, true)
OPTION(fuse_big_writes, OPT_BOOL, true)
Expand Down

0 comments on commit 46c9d24

Please sign in to comment.