ANDROID: Incremental fs: Make data validation failure a warn

Bug: 177234986
Test: incfs_test passes
Signed-off-by: Paul Lawrence <paullawrence@google.com>
Change-Id: I06f1e682c6043c098476a7ca33487775fbb372e8
This commit is contained in:
Paul Lawrence
2021-01-12 11:09:23 -08:00
parent 82501533cf
commit 37bd40c433

View File

@@ -650,7 +650,7 @@ static int validate_hash_tree(struct backing_file_context *bfc, struct file *f,
int i;
bool zero = true;
pr_debug("incfs: Hash mismatch lvl:%d blk:%d\n",
pr_warn("incfs: Hash mismatch lvl:%d blk:%d\n",
lvl, block_index);
for (i = 0; i < digest_size; i++)
if (stored_digest[i]) {
@@ -659,8 +659,7 @@ static int validate_hash_tree(struct backing_file_context *bfc, struct file *f,
}
if (zero)
pr_debug("incfs: Note saved_digest all zero - did you forget to load the hashes?\n");
pr_debug("Note saved_digest all zero - did you forget to load the hashes?\n");
return -EBADMSG;
}
@@ -685,7 +684,7 @@ static int validate_hash_tree(struct backing_file_context *bfc, struct file *f,
return res;
if (memcmp(stored_digest, calculated_digest, digest_size)) {
pr_debug("incfs: Leaf hash mismatch blk:%d\n", block_index);
pr_debug("Leaf hash mismatch blk:%d\n", block_index);
return -EBADMSG;
}
@@ -1135,7 +1134,7 @@ static int wait_for_data_block(struct data_file *df, int block_index,
* Somehow wait finished successfully bug block still
* can't be found. It's not normal.
*/
pr_warn("incfs:Wait succeeded, but block not found.\n");
pr_warn("incfs: Wait succeeded but block not found.\n");
error = -ENODATA;
}
}