fixup! aio: --- BASE PATCH -- (to-be-split). aio
authorAndres Freund <[email protected]>
Wed, 13 Jan 2021 01:16:12 +0000 (17:16 -0800)
committerAndres Freund <[email protected]>
Wed, 13 Jan 2021 01:16:25 +0000 (17:16 -0800)
src/backend/storage/ipc/aio.c

index b63184dd5e32464bfce4e55197290e69a4c5bcbc..76c6e7894f4fa531da7cac09ebeced8932bcce34 100644 (file)
@@ -139,14 +139,14 @@ struct PgAioInProgress
    /* PgAioAction, indexes PgAioCompletionCallbacks */
    PgAioAction type;
 
+   /* which AIO ring is this entry active for */
+   uint8 ring;
+
    PgAioIPFlags flags;
 
    bool user_referenced;
    bool system_referenced;
 
-   /* which AIO ring is this entry active for */
-   uint8 ring;
-
    /* index into allProcs, or PG_UINT32_MAX for process local IO */
    uint32 owner_id;
 
@@ -1019,6 +1019,7 @@ pgaio_uncombine_one(PgAioInProgress *io)
 
        Assert(!(cur->flags & PGAIOIP_SHARED_CALLBACK_CALLED));
        Assert(cur->merge_with || cur != io);
+       Assert(cur->type == io->type);
 
        switch (cur->type)
        {