authfs: Support write config/operation in fuse

Bug: 171279640
Test: atest
Test: tools/device-test.sh

Change-Id: Ic611f72d51a5522d9ec6e6fdc82c115b5782c4ac
diff --git a/authfs/src/fsverity/editor.rs b/authfs/src/fsverity/editor.rs
index fc4e101..543e9ac 100644
--- a/authfs/src/fsverity/editor.rs
+++ b/authfs/src/fsverity/editor.rs
@@ -75,7 +75,6 @@
     merkle_tree: Arc<RwLock<MerkleLeaves>>,
 }
 
-#[allow(dead_code)]
 impl<F: ReadOnlyDataByChunk + RandomWrite> VerifiedFileEditor<F> {
     /// Wraps a supposedly new file for integrity protection.
     pub fn new(file: F) -> Self {
@@ -83,6 +82,7 @@
     }
 
     /// Calculates the fs-verity digest of the current file.
+    #[allow(dead_code)]
     pub fn calculate_fsverity_digest(&self) -> io::Result<Sha256Hash> {
         let merkle_tree = self.merkle_tree.read().unwrap();
         merkle_tree.calculate_fsverity_digest().map_err(|e| io::Error::new(io::ErrorKind::Other, e))
@@ -142,6 +142,10 @@
             )
         }
     }
+
+    pub fn size(&self) -> u64 {
+        self.merkle_tree.read().unwrap().file_size()
+    }
 }
 
 impl<F: ReadOnlyDataByChunk + RandomWrite> RandomWrite for VerifiedFileEditor<F> {