From 5319859700758dec1ee3a54170c4d2627a11aeb3 Mon Sep 17 00:00:00 2001 From: Sebastian Messmer Date: Fri, 11 Dec 2015 00:27:26 +0100 Subject: [PATCH] Adapt to new blobstore which supports blobs >4GB --- ChangeLog.txt | 1 + src/cli/Cli.cpp | 2 +- src/filesystem/fsblobstore/DirBlob.cpp | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index dc0710e7..e6a90846 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,6 +1,7 @@ Version 0.8.4 --------------- * Compatibility with 32bit systems +* Support files larger than 4GB Version 0.8.3 --------------- diff --git a/src/cli/Cli.cpp b/src/cli/Cli.cpp index e002a75f..be5ee85b 100644 --- a/src/cli/Cli.cpp +++ b/src/cli/Cli.cpp @@ -62,7 +62,7 @@ using boost::chrono::duration_cast; using boost::chrono::minutes; using boost::chrono::milliseconds; -//TODO Support files > 4GB +//TODO Delete a large file in parallel possible? Takes a long time right now... //TODO Improve parallelity. //TODO Replace ASSERTs with other error handling when it is not a programming error but an environment influence (e.g. a block is missing) //TODO Performance difference when setting compiler parameter -maes for scrypt? diff --git a/src/filesystem/fsblobstore/DirBlob.cpp b/src/filesystem/fsblobstore/DirBlob.cpp index faf95f19..82b2507c 100644 --- a/src/filesystem/fsblobstore/DirBlob.cpp +++ b/src/filesystem/fsblobstore/DirBlob.cpp @@ -124,7 +124,7 @@ void DirBlob::statChild(const Key &key, struct ::stat *result) const { result->st_mtime = result->st_ctime = result->st_atime = 0; result->st_size = _getLstatSize(key); //TODO Move ceilDivision to general utils which can be used by cryfs as well - result->st_blocks = blobstore::onblocks::utils::ceilDivision(result->st_size, 512); + result->st_blocks = blobstore::onblocks::utils::ceilDivision(result->st_size, (off_t)512); result->st_blksize = CryDevice::BLOCKSIZE_BYTES; //TODO FsBlobStore::BLOCKSIZE_BYTES would be cleaner }