Skip to content

Commit d1dbe4b

Browse files
committed
DAOS-16686 dfuse: check the end offset for concurrent fetch
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 <ddiwang@google.com>
1 parent 1144da5 commit d1dbe4b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/client/dfuse/ops/read.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* (C) Copyright 2016-2024 Intel Corporation.
2+
* (C) Copyright 2016-2025 Intel Corporation.
33
*
44
* SPDX-License-Identifier: BSD-2-Clause-Patent
55
*/
@@ -200,7 +200,8 @@ check_inflight_fetch(struct active_inode *active, struct dfuse_event *ev)
200200
D_SPIN_LOCK(&active->lock);
201201
d_list_for_each_entry(evc, &active->open_reads, de_read_list) {
202202
if (ev->de_req_position >= evc->de_req_position &&
203-
ev->de_req_len <= evc->de_req_len) {
203+
(ev->de_req_len + ev->de_req_position) <=
204+
(evc->de_req_len + evc->de_req_position)) {
204205
d_list_add(&ev->de_read_list, &evc->de_read_slaves);
205206
D_SPIN_UNLOCK(&active->lock);
206207
return true;

0 commit comments

Comments
 (0)