From 872705a237f0f595594983a2bba278d705acd995 Mon Sep 17 00:00:00 2001 From: Paul Lawrence Date: Tue, 12 Jan 2021 11:09:23 -0800 Subject: [PATCH 05/31] ANDROID: Incremental fs: Make data validation failure a warn Bug: 177234986 Test: incfs_test passes Signed-off-by: Paul Lawrence Change-Id: I06f1e682c6043c098476a7ca33487775fbb372e8 --- fs/incfs/data_mgmt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/incfs/data_mgmt.c b/fs/incfs/data_mgmt.c index d55995b5ffe0..55c1213716e3 100644 --- a/fs/incfs/data_mgmt.c +++ b/fs/incfs/data_mgmt.c @@ -650,7 +650,7 @@ static int validate_hash_tree(struct file *bf, struct file *f, int block_index, 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,7 +659,7 @@ static int validate_hash_tree(struct file *bf, struct file *f, int block_index, } 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; } @@ -684,7 +684,7 @@ static int validate_hash_tree(struct file *bf, struct file *f, int block_index, 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; } @@ -1118,7 +1118,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; } } -- 2.17.1