diff --git a/src/stasis/CMakeLists.txt b/src/stasis/CMakeLists.txt index 55449e4..19e4cbd 100644 --- a/src/stasis/CMakeLists.txt +++ b/src/stasis/CMakeLists.txt @@ -15,13 +15,13 @@ ADD_LIBRARY(stasis util/crc32.c util/slab.c util/stlredblack.cpp util/stlslab.cpp - common.c flags.c stats.c bufferManager.c + common.c flags.c util/latchStats.c bufferManager.c operations.c pageHandle.c bufferManager/concurrentBufferManager.c bufferManager/legacy/pageFile.c bufferManager/legacy/pageCache.c bufferManager/legacy/legacyBufferManager.c - page.c bufferPool.c blobManager.c + page.c bufferPool.c recovery2.c truncation.c transactional2.c dirtyPageTable.c transactionTable.c allocationPolicy.c iterator.c @@ -53,6 +53,7 @@ ADD_LIBRARY(stasis util/crc32.c operations/pageOrientedListNTA.c operations/regions.c operations/bTree.c + operations/blobs.c io/rangeTracker.c io/memory.c io/file.c io/pfile.c io/raid1.c io/non_blocking.c io/debug.c io/handle.c bufferManager/pageArray.c diff --git a/src/stasis/bufferManager/pageArray.c b/src/stasis/bufferManager/pageArray.c index 161379f..ee7b45b 100644 --- a/src/stasis/bufferManager/pageArray.c +++ b/src/stasis/bufferManager/pageArray.c @@ -1,7 +1,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/stasis/common.c b/src/stasis/common.c index a9b4fcc..2b9a78b 100644 --- a/src/stasis/common.c +++ b/src/stasis/common.c @@ -2,7 +2,7 @@ #include -#include +#include #include #include diff --git a/src/stasis/experimental/lockManagerImpl.c b/src/stasis/experimental/lockManagerImpl.c index 1579936..321973e 100644 --- a/src/stasis/experimental/lockManagerImpl.c +++ b/src/stasis/experimental/lockManagerImpl.c @@ -1,6 +1,6 @@ #include #include -#include +#include #include #include diff --git a/src/stasis/logger/filePool.c b/src/stasis/logger/filePool.c index 3ab643e..5014b3a 100644 --- a/src/stasis/logger/filePool.c +++ b/src/stasis/logger/filePool.c @@ -8,7 +8,7 @@ #include #include -#include +#include #include #include diff --git a/src/stasis/logger/inMemoryLog.c b/src/stasis/logger/inMemoryLog.c index fe5ca8c..2f8d33d 100644 --- a/src/stasis/logger/inMemoryLog.c +++ b/src/stasis/logger/inMemoryLog.c @@ -1,6 +1,6 @@ #include #include -#include +#include #include #include #include diff --git a/src/stasis/logger/safeWrites.c b/src/stasis/logger/safeWrites.c index a7ff567..08cf125 100644 --- a/src/stasis/logger/safeWrites.c +++ b/src/stasis/logger/safeWrites.c @@ -45,7 +45,7 @@ terms specified in this license. #include #include -#include +#include #include #include diff --git a/src/stasis/operations/alloc.c b/src/stasis/operations/alloc.c index 118fd6b..76e53c6 100644 --- a/src/stasis/operations/alloc.c +++ b/src/stasis/operations/alloc.c @@ -2,7 +2,6 @@ #include #include #include -#include #include #include diff --git a/src/stasis/blobManager.c b/src/stasis/operations/blobs.c similarity index 98% rename from src/stasis/blobManager.c rename to src/stasis/operations/blobs.c index 284520b..fb4693c 100644 --- a/src/stasis/blobManager.c +++ b/src/stasis/operations/blobs.c @@ -50,7 +50,7 @@ void stasis_blob_read(int xid, Page * p, recordid rid, byte * buf) { DEBUG("Chunk = %d->%lld\n", chunk, (long long)rec.offset+chunk); } -void stasis_blob_write(int xid, Page * p, recordid rid, const void* dat) { +void stasis_blob_write(int xid, Page * p, recordid rid, const byte* dat) { blob_record_t rec; recordid r = rid; r.size = sizeof(blob_record_t); diff --git a/src/stasis/operations/linearHashNTA.c b/src/stasis/operations/linearHashNTA.c index 45d6b5a..5932fbe 100644 --- a/src/stasis/operations/linearHashNTA.c +++ b/src/stasis/operations/linearHashNTA.c @@ -1,6 +1,6 @@ #include #define _GNU_SOURCE -#include +#include #include #include #include diff --git a/src/stasis/operations/linkedListNTA.c b/src/stasis/operations/linkedListNTA.c index 5e95cbb..b265dc8 100644 --- a/src/stasis/operations/linkedListNTA.c +++ b/src/stasis/operations/linkedListNTA.c @@ -1,7 +1,7 @@ #define __USE_GNU #define _GNU_SOURCE -#include +#include #include #include diff --git a/src/stasis/operations/naiveLinearHash.c b/src/stasis/operations/naiveLinearHash.c index 4bff250..86663b7 100644 --- a/src/stasis/operations/naiveLinearHash.c +++ b/src/stasis/operations/naiveLinearHash.c @@ -1,7 +1,7 @@ #include #include #include -#include +#include #include /** diff --git a/src/stasis/operations/set.c b/src/stasis/operations/set.c index c66049b..1dbc45d 100644 --- a/src/stasis/operations/set.c +++ b/src/stasis/operations/set.c @@ -46,7 +46,6 @@ terms specified in this license. **********************************************/ #include -#include #include #include #include diff --git a/src/stasis/page.c b/src/stasis/page.c index c76fd84..a3f4f3f 100644 --- a/src/stasis/page.c +++ b/src/stasis/page.c @@ -68,10 +68,10 @@ terms specified in this license. */ #include -#include +#include #include #include -#include +#include #include #include #include diff --git a/src/stasis/transactional2.c b/src/stasis/transactional2.c index 451f5e1..0d9dc3a 100644 --- a/src/stasis/transactional2.c +++ b/src/stasis/transactional2.c @@ -1,4 +1,4 @@ -#include +#include #include #include #include @@ -20,7 +20,7 @@ #include #include -#include // XXX remove this, move Tread() to set.c +#include // XXX remove this, move Tread() to set.c #include #include diff --git a/src/stasis/stats.c b/src/stasis/util/latchStats.c similarity index 97% rename from src/stasis/stats.c rename to src/stasis/util/latchStats.c index 5bcdfd6..5a7bf69 100644 --- a/src/stasis/stats.c +++ b/src/stasis/util/latchStats.c @@ -1,5 +1,5 @@ #include -#include +#include #include #include diff --git a/src/stasis/util/lhtable.c b/src/stasis/util/lhtable.c index 69c3b3e..41f3b06 100644 --- a/src/stasis/util/lhtable.c +++ b/src/stasis/util/lhtable.c @@ -1,7 +1,7 @@ #include #include #include -#include +#include #include diff --git a/stasis/operations.h b/stasis/operations.h index e793770..769f10d 100644 --- a/stasis/operations.h +++ b/stasis/operations.h @@ -157,7 +157,7 @@ typedef struct { #include "operations/regions.h" #include "operations/lsnFreeSet.h" #include "operations/segmentFile.h" - +#include "operations/blobs.h" /** Initialize stasis' operation table. */ diff --git a/stasis/blobManager.h b/stasis/operations/blobs.h similarity index 93% rename from stasis/blobManager.h rename to stasis/operations/blobs.h index 366d806..4306af2 100644 --- a/stasis/blobManager.h +++ b/stasis/operations/blobs.h @@ -52,13 +52,13 @@ BEGIN_C_DECLS /** Read the blob from the recordid rid into buf. */ -void stasis_blob_read(int xid, Page * p, recordid rid, void * buf); +void stasis_blob_read(int xid, Page * p, recordid rid, byte * buf); /** Write the contents of buf to the blob in recordid rid. */ -void stasis_blob_write(int xid, Page * p, recordid rid, const void * buf); +void stasis_blob_write(int xid, Page * p, recordid rid, const byte * buf); recordid preAllocBlob(int xid, long blobsize); recordid preAllocBlobFromPage(int xid, long page, long blobsize); diff --git a/stasis/page.h b/stasis/page.h index d1f85c5..e4bde7d 100644 --- a/stasis/page.h +++ b/stasis/page.h @@ -103,7 +103,7 @@ terms specified in this license. #include #include -#include +#include #include #include diff --git a/stasis/stats.h b/stasis/util/latchStats.h similarity index 100% rename from stasis/stats.h rename to stasis/util/latchStats.h diff --git a/stasis/latches.h b/stasis/util/latches.h similarity index 98% rename from stasis/latches.h rename to stasis/util/latches.h index 41bfdd2..13c9d0c 100644 --- a/stasis/latches.h +++ b/stasis/util/latches.h @@ -1,6 +1,5 @@ #include -#include -#include +#include #ifndef __LATCHES_H #define __LATCHES_H @@ -20,7 +19,7 @@ typedef struct { void * lockpoints; } lladd_pthread_mutex_t; -#include "util/rw.h" +#include "rw.h" /** Keeps some profiling information along with a read/write lock. diff --git a/test/stasis/check_bufferManager.c b/test/stasis/check_bufferManager.c index a791122..d1b9fc4 100644 --- a/test/stasis/check_bufferManager.c +++ b/test/stasis/check_bufferManager.c @@ -1,7 +1,7 @@ #include "../check_includes.h" #include -#include +#include #include #include #include diff --git a/test/stasis/check_logWriter.c b/test/stasis/check_logWriter.c index 2d7afe6..39ce922 100644 --- a/test/stasis/check_logWriter.c +++ b/test/stasis/check_logWriter.c @@ -55,7 +55,7 @@ terms specified in this license. #include #include #include -#include +#include #include #include diff --git a/test/stasis/check_page.c b/test/stasis/check_page.c index 070ecf1..03fde82 100644 --- a/test/stasis/check_page.c +++ b/test/stasis/check_page.c @@ -49,10 +49,10 @@ terms specified in this license. #include #include #include -#include +#include #include #include -#include +#include #include #include diff --git a/test/stasis/check_pageOperations.c b/test/stasis/check_pageOperations.c index 6b6475a..89b014a 100644 --- a/test/stasis/check_pageOperations.c +++ b/test/stasis/check_pageOperations.c @@ -47,7 +47,7 @@ terms specified in this license. #include #include #include -#include +#include #include #include diff --git a/test/stasis/check_regions.c b/test/stasis/check_regions.c index a247972..38f2073 100644 --- a/test/stasis/check_regions.c +++ b/test/stasis/check_regions.c @@ -40,7 +40,7 @@ terms specified in this license. ---*/ #include "../check_includes.h" -#include +#include #include #include diff --git a/test/stasis/check_transactional2.c b/test/stasis/check_transactional2.c index 6162b1d..57447eb 100644 --- a/test/stasis/check_transactional2.c +++ b/test/stasis/check_transactional2.c @@ -41,7 +41,7 @@ terms specified in this license. #include "../check_includes.h" #include -#include +#include #include #include