Refactored write_not_zeroes to use struct bitset_mapping instead of

repeating all that code (has not fixed earlier bug yet, but lots of
repetition cut).
This commit is contained in:
Matthew Bloch
2012-06-07 11:17:02 +01:00
parent 08f3d42b34
commit 5710431780
4 changed files with 32 additions and 43 deletions

View File

@@ -305,7 +305,7 @@ void serve_init_allocation_map(struct server* params)
params->size = size;
SERVER_ERROR_ON_FAILURE(size, "Couldn't find size of %s",
params->filename);
params->block_allocation_map =
params->allocation_map =
build_allocation_map(fd, size, block_allocation_resolution);
close(fd);
}
@@ -336,7 +336,7 @@ void serve_cleanup(struct server* params)
self_pipe_destroy( params->close_signal );
free(params->block_allocation_map);
free(params->allocation_map);
if (params->mirror)
debug("mirror thread running! this should not happen!");