/trusty/user/app/storage/ |
D | file.h | 25 struct transaction; 64 struct transaction* tr, 71 const void* file_get_block(struct transaction* tr, 75 void* file_get_block_write(struct transaction* tr, 81 void file_block_put_dirty(struct transaction* tr, 87 const struct file_info* file_get_info(struct transaction* tr, 92 bool file_get_size(struct transaction* tr, 95 void file_set_size(struct transaction* tr, 99 void file_print(struct transaction* tr, const struct storage_file_handle* file); 100 void files_print(struct transaction* tr); [all …]
|
D | block_allocator.h | 24 struct transaction; 26 data_block_t block_allocate_etc(struct transaction* tr, bool is_tmp); 27 void block_free_etc(struct transaction* tr, data_block_t block, bool is_tmp); 28 bool block_allocator_allocation_queued(struct transaction* tr, 31 void block_allocator_suspend_set_updates(struct transaction* tr); 32 void block_allocator_process_queue(struct transaction* tr); 34 static inline data_block_t block_allocate(struct transaction* tr) { in block_allocate() 38 static inline void block_free(struct transaction* tr, data_block_t block) { in block_free() 42 static inline data_block_t block_allocate_tmp(struct transaction* tr) { in block_allocate_tmp() 46 static inline void block_free_tmp(struct transaction* tr, data_block_t block) { in block_free_tmp()
|
D | block_set.h | 67 struct transaction; 70 void block_set_print(struct transaction* tr, struct block_set* set); 71 bool block_set_check(struct transaction* tr, struct block_set* set); 73 bool block_set_block_in_set(struct transaction* tr, 76 bool block_set_range_in_set(struct transaction* tr, 79 bool block_set_range_not_in_set(struct transaction* tr, 83 data_block_t block_set_find_next_block(struct transaction* tr, 88 struct block_range block_set_find_next_range(struct transaction* tr, 92 bool block_set_overlap(struct transaction* tr, 96 void block_set_add_range(struct transaction* tr, [all …]
|
D | transaction.h | 57 struct transaction { struct 79 void transaction_init(struct transaction* tr, struct fs* fs, bool activate); argument 80 void transaction_free(struct transaction* tr); 81 void transaction_activate(struct transaction* tr); 82 void transaction_fail(struct transaction* tr); 83 void transaction_complete_etc(struct transaction* tr, bool update_checkpoint); 84 void transaction_initial_super_block_complete(struct transaction* tr); 86 static inline bool transaction_is_active(struct transaction* tr) { in transaction_is_active() 90 bool transaction_block_need_copy(struct transaction* tr, data_block_t block);
|
D | block_mac.h | 43 struct transaction; 45 void block_mac_clear(const struct transaction* tr, struct block_mac* dest); 48 data_block_t block_mac_to_block(const struct transaction* tr, 50 const void* block_mac_to_mac(const struct transaction* tr, 52 void block_mac_set_block(const struct transaction* tr, 55 void block_mac_set_mac(const struct transaction* tr, 58 bool block_mac_eq(const struct transaction* tr, 61 void block_mac_copy(const struct transaction* tr, 70 static inline bool block_mac_valid(const struct transaction* tr, in block_mac_valid() 75 static inline bool block_mac_same_block(const struct transaction* tr, in block_mac_same_block() [all …]
|
D | block_cache.h | 27 struct transaction; 56 void block_cache_clean_transaction(struct transaction* tr); 58 void block_cache_discard_transaction(struct transaction* tr, bool discard_all); 60 const void* block_get_no_read(struct transaction* tr, 68 const void* block_get_no_tr_fail(struct transaction* tr, 73 const void* block_get(struct transaction* tr, 78 void* block_dirty(struct transaction* tr, const void* data, bool is_tmp); 86 void block_put_dirty(struct transaction* tr, 98 void* block_get_write_no_read(struct transaction* tr, 103 void* block_get_write(struct transaction* tr, [all …]
|
D | block_map.h | 32 void block_map_init(const struct transaction* tr, 37 bool block_map_get(struct transaction* tr, 42 void block_map_set(struct transaction* tr, 47 void block_map_put_dirty(struct transaction* tr, 53 void block_map_truncate(struct transaction* tr, 57 bool block_map_check(struct transaction* tr, 61 void block_map_free(struct transaction* tr, struct block_map* block_map);
|
D | block_tree.h | 29 struct transaction; 123 struct transaction* tr; 128 void block_tree_print(struct transaction* tr, const struct block_tree* tree); 129 bool block_tree_check(struct transaction* tr, const struct block_tree* tree); 131 void block_tree_walk(struct transaction* state, 154 void block_tree_path_put_dirty(struct transaction* tr, 160 void block_tree_insert(struct transaction* state, 165 void block_tree_insert_block_mac(struct transaction* state, 170 void block_tree_update(struct transaction* state, 177 void block_tree_update_block_mac(struct transaction* state, [all …]
|
D | block_mac.c | 38 void block_mac_clear(const struct transaction* tr, struct block_mac* dest) { in block_mac_clear() 51 data_block_t block_mac_to_block(const struct transaction* tr, in block_mac_to_block() 57 const void* block_mac_to_mac(const struct transaction* tr, in block_mac_to_mac() 62 void block_mac_set_block(const struct transaction* tr, in block_mac_set_block() 68 void block_mac_set_mac(const struct transaction* tr, in block_mac_set_mac() 75 bool block_mac_eq(const struct transaction* tr, in block_mac_eq() 82 void block_mac_copy(const struct transaction* tr, in block_mac_copy()
|
D | checkpoint.h | 25 struct checkpoint* checkpoint_get_new_block(struct transaction* tr, 29 void checkpoint_update_roots(struct transaction* tr, 34 bool checkpoint_read(struct transaction* tr,
|
D | file.c | 54 struct transaction* tr, 68 static data_block_t path_hash(struct transaction* tr, const char* path) { in path_hash() 88 void file_block_map_init(struct transaction* tr, in file_block_map_init() 124 void file_print(struct transaction* tr, in file_print() 150 void files_print(struct transaction* tr) { in files_print() 173 bool file_check(struct transaction* tr, in file_check() 190 static void file_block_map_update(struct transaction* tr, in file_block_map_update() 371 static const void* file_get_block_etc(struct transaction* tr, in file_get_block_etc() 473 const void* file_get_block(struct transaction* tr, in file_get_block() 490 void* file_get_block_write(struct transaction* tr, in file_get_block_write() [all …]
|
D | checkpoint.c | 61 struct checkpoint* checkpoint_get_new_block(struct transaction* tr, in checkpoint_get_new_block() 95 void checkpoint_update_roots(struct transaction* tr, in checkpoint_update_roots() 118 bool checkpoint_read(struct transaction* tr, in checkpoint_read() 162 struct transaction tr; in checkpoint_commit()
|
D | transaction.c | 43 static bool transaction_check_free(struct transaction* tr, in transaction_check_free() 78 static void transaction_merge_free_sets(struct transaction* tr, in transaction_merge_free_sets() 161 static void transaction_rebuild_free_set(struct transaction* tr, in transaction_rebuild_free_set() 246 bool transaction_block_need_copy(struct transaction* tr, data_block_t block) { in transaction_block_need_copy() 259 static void transaction_delete_active(struct transaction* tr) { in transaction_delete_active() 273 void transaction_fail(struct transaction* tr) { in transaction_fail() 294 void transaction_free(struct transaction* tr) { in transaction_free() 309 static void check_free_tree(struct transaction* tr, struct block_set* free) { in check_free_tree() 330 void transaction_complete_etc(struct transaction* tr, bool update_checkpoint) { in transaction_complete_etc() 332 struct transaction* tmp_tr; in transaction_complete_etc() [all …]
|
D | block_map.c | 36 void block_map_init(const struct transaction* tr, in block_map_init() 60 bool block_map_get(struct transaction* tr, in block_map_get() 88 void block_map_set(struct transaction* tr, in block_map_set() 141 void block_map_put_dirty(struct transaction* tr, in block_map_put_dirty() 174 void block_map_truncate(struct transaction* tr, in block_map_truncate() 229 bool block_map_check(struct transaction* tr, in block_map_check() 286 void block_map_free(struct transaction* tr, struct block_map* block_map) { in block_map_free()
|
D | block_set.c | 134 static void block_set_print_ranges(struct transaction* tr, in block_set_print_ranges() 164 void block_set_print(struct transaction* tr, struct block_set* set) { in block_set_print() 180 static bool block_set_check_ranges(struct transaction* tr, in block_set_check_ranges() 220 bool block_set_check(struct transaction* tr, struct block_set* set) { in block_set_check() 246 data_block_t block_set_find_next_block(struct transaction* tr, in block_set_find_next_block() 303 struct block_range block_set_find_next_range(struct transaction* tr, in block_set_find_next_range() 324 bool block_set_block_in_set(struct transaction* tr, in block_set_block_in_set() 339 bool block_set_range_in_set(struct transaction* tr, in block_set_range_in_set() 356 bool block_set_range_not_in_set(struct transaction* tr, in block_set_range_not_in_set() 372 bool block_set_overlap(struct transaction* tr, in block_set_overlap() [all …]
|
D | client_session.h | 34 struct transaction tr;
|
D | block_allocator.c | 239 static data_block_t find_free_block(struct transaction* tr, in find_free_block() 351 data_block_t block_allocate_etc(struct transaction* tr, bool is_tmp) { in block_allocate_etc() 408 static void block_allocator_add_allocated(struct transaction* tr, in block_allocator_add_allocated() 438 void block_free_etc(struct transaction* tr, data_block_t block, bool is_tmp) { in block_free_etc() 461 static void block_allocator_add_free(struct transaction* tr, in block_allocator_add_free() 506 void block_allocator_suspend_set_updates(struct transaction* tr) { in block_allocator_suspend_set_updates() 519 bool block_allocator_allocation_queued(struct transaction* tr, in block_allocator_allocation_queued() 532 void block_allocator_process_queue(struct transaction* tr) { in block_allocator_process_queue()
|
D | fs.h | 161 struct transaction* initial_super_block_tr; 165 bool update_super_block(struct transaction* tr,
|
D | block_cache.c | 463 struct transaction* tr = entry->dirty_tr; in block_cache_entry_clean() 466 struct transaction* itr = entry->dirty_tr->fs->initial_super_block_tr; in block_cache_entry_clean() 997 void block_cache_clean_transaction(struct transaction* tr) { in block_cache_clean_transaction() 1068 void block_cache_discard_transaction(struct transaction* tr, bool discard_all) { in block_cache_discard_transaction() 1137 const void* block_get_no_read(struct transaction* tr, in block_get_no_read() 1180 const void* block_get_no_tr_fail(struct transaction* tr, in block_get_no_tr_fail() 1219 const void* block_get(struct transaction* tr, in block_get() 1251 void* block_dirty(struct transaction* tr, const void* data, bool is_tmp) { in block_dirty() 1342 static void block_put_dirty_etc(struct transaction* tr, in block_put_dirty_etc() 1400 void block_put_dirty(struct transaction* tr, in block_put_dirty() [all …]
|
D | block_cache_priv.h | 130 struct transaction* dirty_tr;
|
D | README.md | 44 - transaction - Transaction init and complete code. 91 changes are tracked by in-memory transaction objects. Before a transaction is 94 not be needed after the transaction completes are stored in the tmp_allocated 97 to update independent files without conflict, files modified by a transaction 98 are stored in temporary trees until the transaction is complete. 110 - State after completing transaction. The second super block is now the most 112 as soon as the next transaction starts, those blocks may be reused. Block 3072
|
/trusty/user/base/lib/storage/rust/src/ |
D | test.rs | 124 let mut transaction = session.begin_transaction(); in write_at() localVariable 125 assert_eq!(Ok(()), transaction.write_at(&mut file, 7, b"C")); in write_at() 126 assert_eq!(Ok(()), transaction.commit()); in write_at() 249 let mut transaction = session.begin_transaction(); in multiple_files_in_transaction() localVariable 251 let mut file_a = transaction.open_file(file_a, OpenMode::CreateExclusive).unwrap(); in multiple_files_in_transaction() 252 let mut file_b = transaction.open_file(file_b, OpenMode::CreateExclusive).unwrap(); in multiple_files_in_transaction() 254 transaction.write_all(&mut file_a, file_contents.as_bytes()).unwrap(); in multiple_files_in_transaction() 255 transaction.write_all(&mut file_b, file_contents.as_bytes()).unwrap(); in multiple_files_in_transaction() 257 transaction.commit().unwrap(); in multiple_files_in_transaction() 291 let mut transaction = session.begin_transaction(); in read_in_transaction() localVariable [all …]
|
/trusty/user/app/storage/test/block_host_test/ |
D | block_test.c | 120 static inline void transaction_complete(struct transaction* tr) { in transaction_complete() 125 struct transaction* tr) { in transaction_complete_update_checkpoint() 129 static void block_test_clear_reinit_etc(struct transaction* tr, in block_test_clear_reinit_etc() 164 static void block_test_swap_clear_reinit(struct transaction* tr, in block_test_swap_clear_reinit() 169 static void block_test_swap_reinit(struct transaction* tr, uint32_t flags) { in block_test_swap_reinit() 173 static void block_test_reinit(struct transaction* tr, uint32_t flags) { in block_test_reinit() 177 static void block_test_clear_superblock_reinit(struct transaction* tr, in block_test_clear_superblock_reinit() 260 static void mark_block_tree_in_use(struct transaction* tr, in mark_block_tree_in_use() 289 static void mark_files_in_use(struct transaction* tr) { in mark_files_in_use() 290 void file_block_map_init(struct transaction * tr, in mark_files_in_use() [all …]
|
D | rules.mk | 33 $(STORAGE_DIR)/transaction.c \
|
/trusty/user/app/storage/test/storage_host_test/ |
D | storage_host_test.c | 50 static inline void transaction_complete(struct transaction* tr) { in transaction_complete() 55 struct transaction* tr) { in transaction_complete_update_checkpoint() 59 static void open_test_file_etc(struct transaction* tr, in open_test_file_etc() 80 static void open_test_file(struct transaction* tr, in open_test_file() 88 static void file_test_open(struct transaction* tr, in file_test_open() 174 static void file_test_commit(struct transaction* tr, bool commit) { in file_test_commit() 185 static void file_test_etc(struct transaction* tr, in file_test_etc() 231 static void file_test(struct transaction* tr, in file_test() 269 static void reset_repaired_flag(struct transaction* tr) { in reset_repaired_flag() 277 struct transaction tr; [all …]
|