Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DAOS-16807 client: intercept io_queue_init in libpil4dfs #15784

Open
wants to merge 2 commits into
base: release/2.6
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions src/client/dfuse/pil4dfs/aio.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright 2024 Intel Corporation.

Check failure on line 2 in src/client/dfuse/pil4dfs/aio.c

View workflow job for this annotation

GitHub Actions / Copyright check

Copyright out of date
*
* SPDX-License-Identifier: BSD-2-Clause-Patent
*/
Expand Down Expand Up @@ -61,11 +61,30 @@
static int (*next_io_getevents)(io_context_t ctx, long min_nr, long nr, struct io_event *events,
struct timespec *timeout);

static int (*next_io_queue_init)(int maxevents, io_context_t *ctxp);
/* aio functions return negative errno in case of failure */

static int
create_ev_eq_for_aio(d_aio_ctx_t *aio_ctx);

int
io_setup(int maxevents, io_context_t *ctxp);

int
io_queue_init(int maxevents, io_context_t *ctxp)
{
if (next_io_queue_init == NULL) {
next_io_queue_init = dlsym(RTLD_NEXT, "io_queue_init");
D_ASSERT(next_io_queue_init != NULL);
}

if (maxevents > 0) {
return io_setup(maxevents, ctxp);
}

return -EINVAL;
}

int
io_setup(int maxevents, io_context_t *ctxp)
{
Expand Down
Loading