aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/backend/storage/aio/aio.c12
-rw-r--r--src/backend/storage/aio/aio_callback.c6
-rw-r--r--src/backend/storage/aio/aio_init.c2
-rw-r--r--src/include/storage/aio_types.h8
4 files changed, 14 insertions, 14 deletions
diff --git a/src/backend/storage/aio/aio.c b/src/backend/storage/aio/aio.c
index 3ed4b1dfdac..29f57f9cd1c 100644
--- a/src/backend/storage/aio/aio.c
+++ b/src/backend/storage/aio/aio.c
@@ -216,7 +216,7 @@ pgaio_io_acquire_nb(struct ResourceOwnerData *resowner, PgAioReturn *ret)
if (ret)
{
ioh->report_return = ret;
- ret->result.status = ARS_UNKNOWN;
+ ret->result.status = PGAIO_RS_UNKNOWN;
}
return ioh;
@@ -669,7 +669,7 @@ pgaio_io_reclaim(PgAioHandle *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();
@@ -829,13 +829,13 @@ pgaio_result_status_string(PgAioResultStatus rs)
{
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";
}
diff --git a/src/backend/storage/aio/aio_callback.c b/src/backend/storage/aio/aio_callback.c
index d5a2cca28f1..09f03f296f5 100644
--- a/src/backend/storage/aio/aio_callback.c
+++ b/src/backend/storage/aio/aio_callback.c
@@ -164,8 +164,8 @@ pgaio_result_report(PgAioResult result, const PgAioTargetData *target_data, int
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",
@@ -220,7 +220,7 @@ pgaio_io_call_complete_shared(PgAioHandle *ioh)
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;
diff --git a/src/backend/storage/aio/aio_init.c b/src/backend/storage/aio/aio_init.c
index 2ede7e80b65..885c3940c66 100644
--- a/src/backend/storage/aio/aio_init.c
+++ b/src/backend/storage/aio/aio_init.c
@@ -202,7 +202,7 @@ AioShmemInit(void)
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);
diff --git a/src/include/storage/aio_types.h b/src/include/storage/aio_types.h
index a5cc658efbd..dddda3a3e2f 100644
--- a/src/include/storage/aio_types.h
+++ b/src/include/storage/aio_types.h
@@ -73,10 +73,10 @@ typedef union PgAioTargetData
*/
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;