reorder initialization code so that the i/o backend stuff happens all at once
This commit is contained in:
parent
cd8c63889d
commit
dfe83a215d
1 changed files with 7 additions and 5 deletions
|
@ -68,6 +68,13 @@ int Tinit() {
|
|||
|
||||
stasis_operation_table_init();
|
||||
|
||||
stasis_transaction_table = stasis_transaction_table_init();
|
||||
stasis_dirty_page_table = stasis_dirty_page_table_init();
|
||||
|
||||
stasis_page_init(stasis_dirty_page_table);
|
||||
|
||||
// XXX move into stasis_log_safe_writes_factory()
|
||||
|
||||
stasis_log_file = 0;
|
||||
|
||||
if(LOG_TO_FILE == stasis_log_type) {
|
||||
|
@ -84,11 +91,6 @@ int Tinit() {
|
|||
assert(stasis_log_file != NULL);
|
||||
}
|
||||
|
||||
stasis_transaction_table = stasis_transaction_table_init();
|
||||
stasis_dirty_page_table = stasis_dirty_page_table_init();
|
||||
|
||||
stasis_page_init(stasis_dirty_page_table);
|
||||
|
||||
stasis_buffer_manager = stasis_buffer_manager_factory(stasis_log_file, stasis_dirty_page_table);
|
||||
|
||||
stasis_dirty_page_table_set_buffer_manager(stasis_dirty_page_table, stasis_buffer_manager); // xxx circular dependency.
|
||||
|
|
Loading…
Reference in a new issue