Skip to content

Commit

Permalink
DAOS-16686 dfuse: check the end offset for concurrent fetch
Browse files Browse the repository at this point in the history
It should check the end offset of fetch during inflight
fetch check.

Run-GHA: true
Skip-func-hw-test: true
Required-githooks: true

Signed-off-by: Di Wang <[email protected]>
  • Loading branch information
wangdi1 committed Jan 11, 2025
1 parent 1144da5 commit d1dbe4b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/client/dfuse/ops/read.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright 2016-2024 Intel Corporation.
* (C) Copyright 2016-2025 Intel Corporation.
*
* SPDX-License-Identifier: BSD-2-Clause-Patent
*/
Expand Down Expand Up @@ -200,7 +200,8 @@ check_inflight_fetch(struct active_inode *active, struct dfuse_event *ev)
D_SPIN_LOCK(&active->lock);
d_list_for_each_entry(evc, &active->open_reads, de_read_list) {
if (ev->de_req_position >= evc->de_req_position &&
ev->de_req_len <= evc->de_req_len) {
(ev->de_req_len + ev->de_req_position) <=
(evc->de_req_len + evc->de_req_position)) {
d_list_add(&ev->de_read_list, &evc->de_read_slaves);
D_SPIN_UNLOCK(&active->lock);
return true;
Expand Down

0 comments on commit d1dbe4b

Please sign in to comment.