diff --git a/source/libs/tdb/src/inc/tdbPCache.h b/source/libs/tdb/src/inc/tdbPCache.h index fe5131e58b..ff4f1acbb6 100644 --- a/source/libs/tdb/src/inc/tdbPCache.h +++ b/source/libs/tdb/src/inc/tdbPCache.h @@ -31,7 +31,8 @@ extern "C" { SPage *pLruNext; \ SPage *pLruPrev; \ SPage *pDirtyNext; \ - SPager *pPager; + SPager *pPager; \ + SPgid pgid; int tdbPCacheOpen(int pageSize, int cacheSize, SPCache **ppCache); int tdbPCacheClose(SPCache *pCache); diff --git a/source/libs/tdb/src/inc/tdbPage.h b/source/libs/tdb/src/inc/tdbPage.h index f4738dbfad..322f2448bb 100644 --- a/source/libs/tdb/src/inc/tdbPage.h +++ b/source/libs/tdb/src/inc/tdbPage.h @@ -22,6 +22,7 @@ extern "C" { typedef u8 SCell; +// Page header typedef struct __attribute__((__packed__)) { u16 flags; u16 nCells; @@ -30,6 +31,7 @@ typedef struct __attribute__((__packed__)) { u16 nFree; } SPageHdr; +// Large page header (pageSize >= 65536 (64K)) typedef struct __attribute__((__packed__)) { u16 flags; u8 nCells[3]; @@ -48,7 +50,6 @@ struct SPage { u8 szOffset; pthread_spinlock_t lock; // Fields below used by pager and am - SPgid pgid; SPageHdr *pPageHdr; SPageFtr *pPageFtr; u8 *aCellIdx;