This commit is contained in:
2025-11-09 12:51:51 +01:00
parent 739d6a7aee
commit a2e949e5e4
2 changed files with 2 additions and 4 deletions
+1 -3
View File
@@ -394,8 +394,6 @@ int file_tree_write(FileTree *ft, string path,
return 0;
}
#define ZERO_HASH ((SHA256) { .data={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } })
int file_tree_read(FileTree *ft, string path,
uint64_t off, uint64_t len, uint64_t *chunk_size,
SHA256 *hashes, int max_hashes)
@@ -423,7 +421,7 @@ int file_tree_read(FileTree *ft, string path,
*chunk_size = f->chunk_size;
uint64_t first_chunk_index = off / f->chunk_size;
uint64_t last_chunk_index = (off + len - 1) / f->chunk_size;
uint64_t last_chunk_index = first_chunk_index + (len - 1) / f->chunk_size;
if (first_chunk_index >= f->num_chunks)
return 0;
+1 -1
View File
@@ -826,7 +826,7 @@ int metadata_server_init(MetadataServer *state, int argc, char **argv, void **co
return -1;
state->trace = trace;
state->replication_factor = 3;
state->replication_factor = 3; // TODO: what about the REPLICATION_FACTOR macro?
if (state->replication_factor > MAX_CHUNK_SERVERS)
return -1;