]> git.tuebingen.mpg.de Git - osl.git/commitdiff
Merge branch 'refs/heads/t/sha3' into master
authorAndre Noll <maan@tuebingen.mpg.de>
Thu, 15 Oct 2020 14:20:54 +0000 (16:20 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Thu, 15 Oct 2020 14:20:54 +0000 (16:20 +0200)
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.

1  2 
Makefile
fsck.c
osl.c
osl_core.h

diff --cc Makefile
Simple merge
diff --cc fsck.c
index e814df55e866529328608d5acd39c5e2e9c76366,42312d9fb472463963b84b3fb93c7190a05ddc7c..53b4a9b345b04db83cb7a314c37afed2ebfd24ac
--- 1/fsck.c
--- 2/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;
diff --cc osl.c
Simple merge
diff --cc osl_core.h
Simple merge