From: Andre Noll Date: Thu, 15 Oct 2020 14:20:54 +0000 (+0200) Subject: Merge branch 'refs/heads/t/sha3' into master X-Git-Tag: v0.2.0^2~1 X-Git-Url: http://git.tuebingen.mpg.de/reccoal.git/log?a=commitdiff_plain;h=758c28419b5b0876bee510f1fb4e01b75b2918f5;p=osl.git Merge branch 'refs/heads/t/sha3' into master This code was written long ago and was sitting in a development branch for some years. As such it was part of the pu branch and so has seen some testing. There's an easy conflict in fsck.c where one side added a function parameter and the other renamed some variables. * refs/heads/t/sha3: Version 3 tables. Add sha3 implementation, introduce version-2 tables. Prepare hash_function() for multiple hash algorithms. Store table version in struct osl_table. Initialize column name hash *after* table version is known. osl_open_table(): Remove pointless directory check. Remove sha1.h. Remove COMPAT_TABLE_VERSION. --- 758c28419b5b0876bee510f1fb4e01b75b2918f5 diff --cc fsck.c index e814df5,42312d9..53b4a9b --- a/fsck.c +++ b/fsck.c @@@ -716,18 -712,18 +716,18 @@@ static int check_disk_storage_presence( return 1; hashes = fsck_malloc(t->num_rows * HASH_SIZE); INFO_LOG("looking for missing disk storage objects\n"); - for (i = 0; i < t->num_rows; i++) { - if (row_is_invalid(t, i)) + for (k = 0; k < t->num_rows; k++) { + if (row_is_invalid(t, k)) continue; - ret = get_mapped_object(t, dsnc, i, &obj); + ret = get_mapped_object(t, dsnc, k, &obj); if (ret < 0) return ret; - hash_object(&obj, hashes + k * HASH_SIZE); - hash_object(t, &obj, hashes + i * HASH_SIZE); - hash_obj.data = hashes + i * HASH_SIZE; ++ hash_object(t, &obj, hashes + k * HASH_SIZE); + hash_obj.data = hashes + k * HASH_SIZE; osl_add_row(hash_tree_table, &hash_obj); - ds_name = disk_storage_name_of_hash(t, hashes + i * HASH_SIZE); - FOR_EACH_DISK_STORAGE_COLUMN(j, t, cd) { - ret = check_disk_storage_column(t, i, j, ds_name, + ds_name = disk_storage_name_of_hash(t, hashes + k * HASH_SIZE); + FOR_EACH_DISK_STORAGE_COLUMN(n, t, cd) { + ret = check_disk_storage_column(t, k, n, ds_name, &missing_objects); if (ret < 0) goto err;