Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/llfio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com>2018-04-08 02:18:05 +0300
committerNiall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com>2018-04-08 02:18:05 +0300
commit59bddf7442aacad75a729dbfa22167fbf7adaefd (patch)
tree0cff15d376a5202c845afcdbb1e0ce1441fe93e1
parent4b294d16741aaf81c525e789244f7b68a9e8a781 (diff)
Fix broken programs, lack of regen of docs
-rw-r--r--.travis.yml2
-rw-r--r--cmake/tests.cmake1
-rw-r--r--programs/key-value-store/include/key_value_store.hpp14
3 files changed, 9 insertions, 8 deletions
diff --git a/.travis.yml b/.travis.yml
index 2f648092..6cf66ead 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -48,7 +48,7 @@ matrix:
- os: osx
env: __="cmake tests" NAME=TravisLinuxWorker
- os: linux
- compiler: clang++
+ compiler: g++
env: __="Documentation" NAME=TravisDocumentation
- os: linux
env: __="cmake tests" NAME=TravisOSXWorker
diff --git a/cmake/tests.cmake b/cmake/tests.cmake
index 57f7d665..7f9f7aad 100644
--- a/cmake/tests.cmake
+++ b/cmake/tests.cmake
@@ -24,6 +24,7 @@ set(afio_TESTS
)
# DO NOT EDIT, GENERATED BY SCRIPT
set(afio_COMPILE_TESTS
+ "example/use_cases.cpp"
)
# DO NOT EDIT, GENERATED BY SCRIPT
set(afio_COMPILE_FAIL_TESTS
diff --git a/programs/key-value-store/include/key_value_store.hpp b/programs/key-value-store/include/key_value_store.hpp
index 2035fd48..1fd4ddc8 100644
--- a/programs/key-value-store/include/key_value_store.hpp
+++ b/programs/key-value-store/include/key_value_store.hpp
@@ -127,7 +127,7 @@ namespace key_value_store
- uint128 key 16 bytes
- value_history 104 bytes
*/
- using open_hash_index = basic_open_hash_index<atomic_linear_memory_policy<key_type, value_history, 0>, AFIO_V2_NAMESPACE::algorithm::mapped_view>;
+ using open_hash_index = basic_open_hash_index<atomic_linear_memory_policy<key_type, value_history, 0>, AFIO_V2_NAMESPACE::algorithm::mapped_span>;
static_assert(sizeof(open_hash_index::value_type) == 128, "open_hash_index::value_type is wrong size");
struct index
@@ -290,7 +290,7 @@ namespace key_value_store
i.magic = _goodmagic;
i.all_writes_synced = _indexfile.are_writes_durable();
i.contents_hashed = enable_integrity;
- _indexfile.write(0, (char *) &i, sizeof(i)).value();
+ _indexfile.write(0, {{(char *) &i, sizeof(i)}}).value();
}
else
{
@@ -306,11 +306,11 @@ namespace key_value_store
}
// Now we've finished the checks, reset writes_occurring and all_writes_synced
index::index i;
- _indexfile.read(0, (char *) &i, sizeof(i)).value();
+ _indexfile.read(0, {{(char *) &i, sizeof(i)}}).value();
memset(i.writes_occurring, 0, sizeof(i.writes_occurring));
i.all_writes_synced = _indexfile.are_writes_durable();
memset(&i.hash, 0, sizeof(i.hash));
- _indexfile.write(0, (char *) &i, sizeof(i)).value();
+ _indexfile.write(0, {{(char *) &i, sizeof(i)}}).value();
}
}
}
@@ -318,7 +318,7 @@ namespace key_value_store
_indexfileguard = _indexfile.lock(_indexinuseoffset, 1, false).value();
{
char buffer[8];
- _indexfile.read(0, buffer, 8).value();
+ _indexfile.read(0, {{buffer, 8}}).value();
auto goodmagic = _goodmagic;
auto badmagic = _badmagic;
if(!memcmp(buffer, &badmagic, 8))
@@ -465,7 +465,7 @@ namespace key_value_store
}
else
{
- // TODO Depending on length, make a mapped_view instead
+ // TODO Depending on length, make a mapped_span instead
const auto &item = it->second.history[revision];
if(item.transaction_counter == 0)
{
@@ -502,7 +502,7 @@ namespace key_value_store
{
throw std::bad_alloc();
}
- _smallfiles.blocking[item.value_identifier].read(item.value_offset * 64 - smallfilelength, buffer, smallfilelength).value();
+ _smallfiles.blocking[item.value_identifier].read(item.value_offset * 64 - smallfilelength, {{buffer, smallfilelength}}).value();
}
index::value_tail *vt = reinterpret_cast<index::value_tail *>(buffer + smallfilelength - sizeof(index::value_tail));
if(_indexheader->contents_hashed || _indexheader->key_is_hash_of_value)