Remove duplicate journal writing code (and fix it at the same time)

This commit is contained in:
Vitaliy Filippov
2019-11-11 00:28:14 +03:00
parent ff57dd420e
commit 8edb9e9d6f
7 changed files with 151 additions and 168 deletions
+6 -2
View File
@@ -84,6 +84,10 @@
return 0;\
}
class blockstore;
class blockstore_operation;
// 16 bytes per object/stripe id
// stripe includes replica number in 4 least significant bits
struct __attribute__((__packed__)) object_id
@@ -202,6 +206,7 @@ struct blockstore_operation
// FIXME: Move internal fields somewhere
friend class blockstore;
friend class blockstore_journal_check_t;
private:
// Wait status
int wait_for;
@@ -220,8 +225,6 @@ private:
int sync_state, prev_sync_count;
};
class blockstore;
#include "blockstore_init.h"
class blockstore
@@ -255,6 +258,7 @@ class blockstore
friend class blockstore_init_meta;
friend class blockstore_init_journal;
friend class blockstore_journal_check_t;
void calc_lengths(spp::sparse_hash_map<std::string, std::string> & config);
void open_data(spp::sparse_hash_map<std::string, std::string> & config);