summaryrefslogtreecommitdiff
path: root/src/include/storage
diff options
context:
space:
mode:
authorAndres Freund2025-04-01 17:47:46 +0000
committerAndres Freund2025-04-01 17:47:46 +0000
commit93bc3d75d8e1aabdc256ff6da2282266dca82537 (patch)
tree9edc8a9eb2e202381ac853f4dbbad1ecc0fba3fa /src/include/storage
parent60f566b4f24362f54003569d5f6e24137bcd83fc (diff)
aio: Add test_aio module
To make the tests possible, a few functions from bufmgr.c/localbuf.c had to be exported, via buf_internals.h. Reviewed-by: Noah Misch <[email protected]> Co-authored-by: Andres Freund <[email protected]> Co-authored-by: Nazir Bilal Yavuz <[email protected]> Discussion: https://postgr.es/m/uvrtrknj4kdytuboidbhwclo4gxhswwcpgadptsjvjqcluzmah%40brqs62irg4dt
Diffstat (limited to 'src/include/storage')
-rw-r--r--src/include/storage/buf_internals.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/include/storage/buf_internals.h b/src/include/storage/buf_internals.h
index 72b36a4af26..0dec7d93b3b 100644
--- a/src/include/storage/buf_internals.h
+++ b/src/include/storage/buf_internals.h
@@ -434,6 +434,12 @@ extern void IssuePendingWritebacks(WritebackContext *wb_context, IOContext io_co
extern void ScheduleBufferTagForWriteback(WritebackContext *wb_context,
IOContext io_context, BufferTag *tag);
+/* solely to make it easier to write tests */
+extern bool StartBufferIO(BufferDesc *buf, bool forInput, bool nowait);
+extern void TerminateBufferIO(BufferDesc *buf, bool clear_dirty, uint32 set_flag_bits,
+ bool forget_owner, bool release_aio);
+
+
/* freelist.c */
extern IOContext IOContextForStrategy(BufferAccessStrategy strategy);
extern BufferDesc *StrategyGetBuffer(BufferAccessStrategy strategy,
@@ -478,6 +484,7 @@ extern void TerminateLocalBufferIO(BufferDesc *bufHdr, bool clear_dirty,
uint32 set_flag_bits, bool release_aio);
extern bool StartLocalBufferIO(BufferDesc *bufHdr, bool forInput, bool nowait);
extern void FlushLocalBuffer(BufferDesc *bufHdr, SMgrRelation reln);
+extern void InvalidateLocalBuffer(BufferDesc *bufHdr, bool check_unreferenced);
extern void DropRelationLocalBuffers(RelFileLocator rlocator,
ForkNumber forkNum,
BlockNumber firstDelBlock);