PostgreSQL Source Code git master
|
#include "postgres.h"
#include "miscadmin.h"
#include "storage/aio.h"
#include "storage/aio_internal.h"
Go to the source code of this file.
Data Structures | |
struct | PgAioHandleCallbacksEntry |
Macros | |
#define | CALLBACK_ENTRY(id, callback) [id] = {.cb = &callback, .name = #callback} |
Typedefs | |
typedef struct PgAioHandleCallbacksEntry | PgAioHandleCallbacksEntry |
Functions | |
void | pgaio_io_register_callbacks (PgAioHandle *ioh, PgAioHandleCallbackID cb_id, uint8 cb_data) |
void | pgaio_io_set_handle_data_64 (PgAioHandle *ioh, uint64 *data, uint8 len) |
void | pgaio_io_set_handle_data_32 (PgAioHandle *ioh, uint32 *data, uint8 len) |
uint64 * | pgaio_io_get_handle_data (PgAioHandle *ioh, uint8 *len) |
void | pgaio_result_report (PgAioResult result, const PgAioTargetData *target_data, int elevel) |
void | pgaio_io_call_stage (PgAioHandle *ioh) |
void | pgaio_io_call_complete_shared (PgAioHandle *ioh) |
void | pgaio_io_call_complete_local (PgAioHandle *ioh) |
Variables | |
static const PgAioHandleCallbacks | aio_invalid_cb = {0} |
static const PgAioHandleCallbacksEntry | aio_handle_cbs [] |
typedef struct PgAioHandleCallbacksEntry PgAioHandleCallbacksEntry |
void pgaio_io_call_complete_local | ( | PgAioHandle * | ioh | ) |
Definition at line 268 of file aio_callback.c.
References aio_handle_cbs, Assert(), PgAioHandle::callbacks, PgAioHandle::callbacks_data, PgAioHandleCallbacksEntry::cb, PgAioHandleCallbacks::complete_local, DEBUG3, DEBUG4, PgAioHandle::distilled_result, END_CRIT_SECTION, PgAioResult::error_data, i, PgAioResult::id, PgAioHandleCallbacksEntry::name, PgAioHandle::num_callbacks, PgAioHandle::op, pgaio_debug_io, PGAIO_OP_COUNT, PGAIO_OP_INVALID, pgaio_result_status_string(), PGAIO_TID_COUNT, PGAIO_TID_INVALID, PgAioHandle::result, PgAioResult::result, START_CRIT_SECTION, PgAioResult::status, and PgAioHandle::target.
Referenced by pgaio_io_reclaim().
void pgaio_io_call_complete_shared | ( | PgAioHandle * | ioh | ) |
Definition at line 214 of file aio_callback.c.
References aio_handle_cbs, Assert(), PgAioHandle::callbacks, PgAioHandle::callbacks_data, PgAioHandleCallbacksEntry::cb, PgAioHandleCallbacks::complete_shared, DEBUG3, DEBUG4, PgAioHandle::distilled_result, END_CRIT_SECTION, PgAioResult::error_data, i, PgAioResult::id, PgAioHandleCallbacksEntry::name, PgAioHandle::num_callbacks, PgAioHandle::op, pgaio_debug_io, PGAIO_HCB_INVALID, PGAIO_OP_COUNT, PGAIO_OP_INVALID, pgaio_result_status_string(), PGAIO_RS_OK, PGAIO_TID_COUNT, PGAIO_TID_INVALID, PgAioHandle::result, PgAioResult::result, START_CRIT_SECTION, PgAioResult::status, and PgAioHandle::target.
Referenced by pgaio_io_process_completion().
void pgaio_io_call_stage | ( | PgAioHandle * | ioh | ) |
Definition at line 188 of file aio_callback.c.
References aio_handle_cbs, Assert(), PgAioHandle::callbacks, PgAioHandle::callbacks_data, PgAioHandleCallbacksEntry::cb, DEBUG3, i, PgAioHandleCallbacksEntry::name, PgAioHandle::num_callbacks, PgAioHandle::op, pgaio_debug_io, PGAIO_OP_COUNT, PGAIO_OP_INVALID, PGAIO_TID_COUNT, PGAIO_TID_INVALID, PgAioHandleCallbacks::stage, and PgAioHandle::target.
Referenced by pgaio_io_stage().
uint64 * pgaio_io_get_handle_data | ( | PgAioHandle * | ioh, |
uint8 * | len | ||
) |
Definition at line 145 of file aio_callback.c.
References Assert(), PgAioCtl::handle_data, PgAioHandle::handle_data_len, PgAioHandle::iovec_off, len, and pgaio_ctl.
void pgaio_io_register_callbacks | ( | PgAioHandle * | ioh, |
PgAioHandleCallbackID | cb_id, | ||
uint8 | cb_data | ||
) |
Definition at line 78 of file aio_callback.c.
References aio_handle_cbs, PgAioHandle::callbacks, PgAioHandle::callbacks_data, PgAioHandleCallbacksEntry::cb, PgAioHandleCallbacks::complete_local, DEBUG3, elog, ERROR, lengthof, PgAioHandleCallbacksEntry::name, PgAioHandle::num_callbacks, PANIC, pgaio_debug_io, and PGAIO_HANDLE_MAX_CALLBACKS.
void pgaio_io_set_handle_data_32 | ( | PgAioHandle * | ioh, |
uint32 * | data, | ||
uint8 | len | ||
) |
Definition at line 130 of file aio_callback.c.
References Assert(), data, PgAioCtl::handle_data, PgAioHandle::handle_data_len, i, PgAioHandle::iovec_off, len, PG_IOV_MAX, pgaio_ctl, PGAIO_HS_HANDED_OUT, and PgAioHandle::state.
void pgaio_io_set_handle_data_64 | ( | PgAioHandle * | ioh, |
uint64 * | data, | ||
uint8 | len | ||
) |
Definition at line 113 of file aio_callback.c.
References Assert(), data, PgAioCtl::handle_data, PgAioHandle::handle_data_len, i, PgAioHandle::iovec_off, len, PG_IOV_MAX, pgaio_ctl, PGAIO_HS_HANDED_OUT, and PgAioHandle::state.
void pgaio_result_report | ( | PgAioResult | result, |
const PgAioTargetData * | target_data, | ||
int | elevel | ||
) |
Definition at line 162 of file aio_callback.c.
References aio_handle_cbs, Assert(), PgAioHandleCallbacksEntry::cb, elog, ERROR, PgAioResult::id, PgAioHandleCallbacksEntry::name, PGAIO_RS_OK, PGAIO_RS_UNKNOWN, PgAioHandleCallbacks::report, and PgAioResult::status.
|
static |
Definition at line 37 of file aio_callback.c.
Referenced by pgaio_io_call_complete_local(), pgaio_io_call_complete_shared(), pgaio_io_call_stage(), pgaio_io_register_callbacks(), and pgaio_result_report().
|
static |
Definition at line 24 of file aio_callback.c.