Skip to content

Commit

Permalink
DAOS-0000 dfuse: Enable faster reading from data cache with dfuse.
Browse files Browse the repository at this point in the history
Allow metadata caching even when the file is open.
Intercept getxattr for security.capability and do
not send to server.

Test-tag: test_dfuse_daos_build_wt

Required-githooks: true

Signed-off-by: Ashley Pittman <[email protected]>
  • Loading branch information
ashleypittman committed Sep 15, 2023
1 parent 8647532 commit 2f93c77
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/client/dfuse/dfuse.h
Original file line number Diff line number Diff line change
Expand Up @@ -567,10 +567,8 @@ struct fuse_lowlevel_ops dfuse_ops;
do { \
int __rc; \
double timeout = 0; \
if (atomic_load_relaxed(&(ie)->ie_open_count) == 0) { \
timeout = (ie)->ie_dfs->dfc_attr_timeout; \
dfuse_mcache_set_time(ie); \
} \
timeout = (ie)->ie_dfs->dfc_attr_timeout; \
dfuse_mcache_set_time(ie); \
DFUSE_TRA_DEBUG(ie, "Returning attr inode %#lx mode %#o size %zi timeout %lf", \
(attr)->st_ino, (attr)->st_mode, (attr)->st_size, timeout); \
__rc = fuse_reply_attr(req, attr, timeout); \
Expand Down
6 changes: 6 additions & 0 deletions src/client/dfuse/ops/getxattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

#include "daos_uns.h"

#define SECURITY_CAP "security.capability"

static int
_dfuse_attr_create(char *type, uuid_t pool, uuid_t cont, char **_value, daos_size_t *_out_size)
{
Expand Down Expand Up @@ -59,6 +61,10 @@ dfuse_cb_getxattr(fuse_req_t req, struct dfuse_inode_entry *inode, const char *n
}
}

if (strncmp(name, SECURITY_CAP, sizeof(SECURITY_CAP)) == 0) {
D_GOTO(free, rc = ENODATA);
}

rc = dfs_getxattr(inode->ie_dfs->dfs_ns, inode->ie_obj, name, NULL, &out_size);
if (rc != 0)
D_GOTO(err, rc);
Expand Down

0 comments on commit 2f93c77

Please sign in to comment.