The previous prefix wasn't consistent with the naming of other AIO related
enum values. It seems best to rename it before the users are introduced.
Reported-by: Melanie Plageman <[email protected]>
Discussion: https://postgr.es/m/CAAKRu_Yb+JzQpNsgUxCB0gBi+sE-mi_HmcJF6ALnmO4W+UgwpA@mail.gmail.com
if (ret)
{
ioh->report_return = ret;
- ret->result.status = ARS_UNKNOWN;
+ ret->result.status = PGAIO_RS_UNKNOWN;
}
return ioh;
ioh->handle_data_len = 0;
ioh->report_return = NULL;
ioh->result = 0;
- ioh->distilled_result.status = ARS_UNKNOWN;
+ ioh->distilled_result.status = PGAIO_RS_UNKNOWN;
/* XXX: the barrier is probably superfluous */
pg_write_barrier();
{
switch (rs)
{
- case ARS_UNKNOWN:
+ case PGAIO_RS_UNKNOWN:
return "UNKNOWN";
- case ARS_OK:
+ case PGAIO_RS_OK:
return "OK";
- case ARS_PARTIAL:
+ case PGAIO_RS_PARTIAL:
return "PARTIAL";
- case ARS_ERROR:
+ case PGAIO_RS_ERROR:
return "ERROR";
}
PgAioHandleCallbackID cb_id = result.id;
const PgAioHandleCallbacksEntry *ce = &aio_handle_cbs[cb_id];
- Assert(result.status != ARS_UNKNOWN);
- Assert(result.status != ARS_OK);
+ Assert(result.status != PGAIO_RS_UNKNOWN);
+ Assert(result.status != PGAIO_RS_OK);
if (ce->cb->report == NULL)
elog(ERROR, "callback %d/%s does not have report callback",
Assert(ioh->target > PGAIO_TID_INVALID && ioh->target < PGAIO_TID_COUNT);
Assert(ioh->op > PGAIO_OP_INVALID && ioh->op < PGAIO_OP_COUNT);
- result.status = ARS_OK; /* low level IO is always considered OK */
+ result.status = PGAIO_RS_OK; /* low level IO is always considered OK */
result.result = ioh->result;
result.id = PGAIO_HCB_INVALID;
result.error_data = 0;
ioh->report_return = NULL;
ioh->resowner = NULL;
ioh->num_callbacks = 0;
- ioh->distilled_result.status = ARS_UNKNOWN;
+ ioh->distilled_result.status = PGAIO_RS_UNKNOWN;
ioh->flags = 0;
ConditionVariableInit(&ioh->cv);
*/
typedef enum PgAioResultStatus
{
- ARS_UNKNOWN, /* not yet completed / uninitialized */
- ARS_OK,
- ARS_PARTIAL, /* did not fully succeed, but no error */
- ARS_ERROR,
+ PGAIO_RS_UNKNOWN, /* not yet completed / uninitialized */
+ PGAIO_RS_OK,
+ PGAIO_RS_PARTIAL, /* did not fully succeed, but no error */
+ PGAIO_RS_ERROR,
} PgAioResultStatus;