diff --git a/src/CryDevice.cpp b/src/CryDevice.cpp index 0c82e1a8..383cfafa 100644 --- a/src/CryDevice.cpp +++ b/src/CryDevice.cpp @@ -8,6 +8,7 @@ #include "messmer/blobstore/implementations/onblocks/BlobStoreOnBlocks.h" #include "messmer/blobstore/implementations/onblocks/BlobOnBlocks.h" #include "messmer/blockstore/implementations/encrypted/EncryptedBlockStore.h" +#include "messmer/blockstore/implementations/caching2/Caching2BlockStore.h" using std::unique_ptr; using std::make_unique; @@ -22,13 +23,14 @@ using blockstore::Key; using blockstore::encrypted::EncryptedBlockStore; using blobstore::onblocks::BlobStoreOnBlocks; using blobstore::onblocks::BlobOnBlocks; +using blockstore::caching2::Caching2BlockStore; namespace cryfs { constexpr uint32_t CryDevice::BLOCKSIZE_BYTES; CryDevice::CryDevice(unique_ptr config, unique_ptr blockStore) -: _blobStore(make_unique(make_unique(std::move(blockStore), config->EncryptionKey()), BLOCKSIZE_BYTES)), _rootKey(GetOrCreateRootKey(config.get())) { +: _blobStore(make_unique(make_unique(make_unique(std::move(blockStore), config->EncryptionKey())), BLOCKSIZE_BYTES)), _rootKey(GetOrCreateRootKey(config.get())) { } Key CryDevice::GetOrCreateRootKey(CryConfig *config) { diff --git a/src/CryDevice.h b/src/CryDevice.h index c32839d6..8d53ba50 100644 --- a/src/CryDevice.h +++ b/src/CryDevice.h @@ -18,7 +18,7 @@ namespace bf = boost::filesystem; class CryDevice: public fspp::Device { public: - static constexpr uint32_t BLOCKSIZE_BYTES = 8 * 1024; + static constexpr uint32_t BLOCKSIZE_BYTES = 32 * 1024; CryDevice(std::unique_ptr config, std::unique_ptr blockStore); virtual ~CryDevice();