Skip to content

Commit

Permalink
DAOS-16685 dfuse: just for test
Browse files Browse the repository at this point in the history
- remove eq usage from dfuse

Required-githooks: true

Signed-off-by: Mohamad Chaarawi <mohamad.chaarawi@intel.com>
  • Loading branch information
mchaarawi committed Oct 22, 2024
1 parent e117a6c commit 4e05418
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
6 changes: 3 additions & 3 deletions src/client/dfuse/ops/fgetattr.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright 2016-2023 Intel Corporation.
* (C) Copyright 2016-2024 Intel Corporation.
*
* SPDX-License-Identifier: BSD-2-Clause-Patent
*/
Expand Down Expand Up @@ -54,11 +54,11 @@ dfuse_cb_getattr(fuse_req_t req, struct dfuse_inode_entry *ie)
if (rc != -DER_SUCCESS)
D_GOTO(ev, rc = daos_der2errno(rc));

rc = dfs_ostatx(ie->ie_dfs->dfs_ns, ie->ie_obj, &ev->de_attr, &ev->de_ev);
rc = dfs_ostatx(ie->ie_dfs->dfs_ns, ie->ie_obj, &ev->de_attr, NULL);
if (rc != 0)
D_GOTO(ev, rc);

sem_post(&eqt->de_sem);
// sem_post(&eqt->de_sem);

return;
ev:
Expand Down
13 changes: 6 additions & 7 deletions src/client/dfuse/ops/read.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,13 +304,12 @@ chunk_fetch(fuse_req_t req, struct dfuse_obj_hdl *oh, struct read_chunk_data *cd
cd->reqs[slot] = req;
cd->ohs[slot] = oh;

rc = dfs_read(ie->ie_dfs->dfs_ns, ie->ie_obj, &ev->de_sgl, position, &ev->de_len,
&ev->de_ev);
rc = dfs_read(ie->ie_dfs->dfs_ns, ie->ie_obj, &ev->de_sgl, position, &ev->de_len, NULL);
if (rc != 0)
goto err;

/* Send a message to the async thread to wake it up and poll for events */
sem_post(&eqt->de_sem);
// sem_post(&eqt->de_sem);

/* Now ensure there are more descriptors for the next request */
d_slab_restock(eqt->de_read_slab);
Expand Down Expand Up @@ -527,14 +526,14 @@ dfuse_cb_read(fuse_req_t req, fuse_ino_t ino, size_t len, off_t position, struct

DFUSE_IE_WFLUSH(oh->doh_ie);

rc = dfs_read(oh->doh_dfs, oh->doh_obj, &ev->de_sgl, position, &ev->de_len, &ev->de_ev);
rc = dfs_read(oh->doh_dfs, oh->doh_obj, &ev->de_sgl, position, &ev->de_len, NULL);
if (rc != 0) {
D_GOTO(err, rc);
return;
}

/* Send a message to the async thread to wake it up and poll for events */
sem_post(&eqt->de_sem);
// sem_post(&eqt->de_sem);

/* Now ensure there are more descriptors for the next request */
d_slab_restock(eqt->de_read_slab);
Expand Down Expand Up @@ -598,14 +597,14 @@ dfuse_pre_read(struct dfuse_info *dfuse_info, struct dfuse_obj_hdl *oh)
ev->de_complete_cb = dfuse_cb_pre_read_complete;
oh->doh_readahead->dra_ev = ev;

rc = dfs_read(oh->doh_dfs, oh->doh_obj, &ev->de_sgl, 0, &ev->de_len, &ev->de_ev);
rc = dfs_read(oh->doh_dfs, oh->doh_obj, &ev->de_sgl, 0, &ev->de_len, NULL);
if (rc != 0) {
D_GOTO(err, rc);
return;
}

/* Send a message to the async thread to wake it up and poll for events */
sem_post(&eqt->de_sem);
// sem_post(&eqt->de_sem);

/* Now ensure there are more descriptors for the next request */
d_slab_restock(eqt->de_read_slab);
Expand Down
4 changes: 2 additions & 2 deletions src/client/dfuse/ops/write.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,15 @@ dfuse_cb_write(fuse_req_t req, fuse_ino_t ino, struct fuse_bufvec *bufv, off_t p
if (len + position > oh->doh_ie->ie_stat.st_size)
oh->doh_ie->ie_stat.st_size = len + position;

rc = dfs_write(oh->doh_dfs, oh->doh_obj, &ev->de_sgl, position, &ev->de_ev);
rc = dfs_write(oh->doh_dfs, oh->doh_obj, &ev->de_sgl, position, NULL);
if (rc != 0)
D_GOTO(err, rc);

if (wb_cache)
DFUSE_REPLY_WRITE(oh, req, len);

/* Send a message to the async thread to wake it up and poll for events */
sem_post(&eqt->de_sem);
// sem_post(&eqt->de_sem);

/* Now ensure there are more descriptors for the next request */
d_slab_restock(eqt->de_write_slab);
Expand Down

0 comments on commit 4e05418

Please sign in to comment.