Skip to content

Commit e7add9e

Browse files
authored
DAOS-18582 vos: fix picking up pages for pinning (#17578)
As of now, this code path is used only by DTX commit/abort. The bug caused unrelated parts of the structure to be interpreted as page indices that were about to be pinned, instead of using only the page indices already added to the array. Because this part of the code determines both which pages should be pinned and whether additional pages would get pinned, it led to two outcomes: In the best case: DTX commit/abort operations were processed in smaller "chunks" than intended, which could result in performance degradation. In the worst case: The code reasoned a certain page indices are in the array where in fact they were not. As a result, some page indices never made it into the array and were never pinned. Later code assumed that all required pages have been pinned, so a missing page would ultimately lead to a crash. Signed-off-by: Jan Michalski <jan-marian.michalski@hpe.com>
1 parent 3722759 commit e7add9e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/vos/vos_obj_cache.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* (C) Copyright 2016-2024 Intel Corporation.
3-
* (C) Copyright 2025 Hewlett Packard Enterprise Development LP
3+
* (C) Copyright 2025-2026 Hewlett Packard Enterprise Development LP
44
*
55
* SPDX-License-Identifier: BSD-2-Clause-Patent
66
*/
@@ -849,7 +849,8 @@ vos_bkt_array_subset(struct vos_bkt_array *super, struct vos_bkt_array *sub)
849849
return false;
850850

851851
for (i = 0; i < sub->vba_cnt; i++) {
852-
idx = daos_array_find(super, super->vba_cnt, sub->vba_bkts[i], &bkt_sort_ops);
852+
idx = daos_array_find(super->vba_bkts, super->vba_cnt, sub->vba_bkts[i],
853+
&bkt_sort_ops);
853854
if (idx < 0)
854855
return false;
855856
}

0 commit comments

Comments
 (0)