Read Merkle tree once per file
EagerChunkReader is added to read the wrapper Merkle tree reader. Also
add a function to calculate the tree size, in order to know how much
bytes to read.
Separately, add a check in fd_server to prevent crash when the read size
is 0.
Bug: 182827266
Test: atest AuthFsHostTest authfs_device_test_src_lib
Change-Id: Ibff8c9ac091f1449aec8f4a52cd148e6f41d7b33
diff --git a/authfs/src/fsverity.rs b/authfs/src/fsverity.rs
index 1515574..61ae928 100644
--- a/authfs/src/fsverity.rs
+++ b/authfs/src/fsverity.rs
@@ -20,5 +20,6 @@
mod sys;
mod verifier;
+pub use common::merkle_tree_size;
pub use editor::VerifiedFileEditor;
pub use verifier::VerifiedFileReader;