Set block size of encrypted storage fs to 4096B
If unspecified, block-size is heuristically determined by the filesystem
size and the expected usage of the filesystem. In case of encrypted
storage, the backing file(on host) anyway uses 4k, so the (default)
heuristic is not of much use. Host fs (/data) is also uses 4096B as the
block size.
Bug: 260329386
Test: stat -f /mnt/encryptedstore/
Change-Id: I87443bd1ee8cabf13585e7cbb5a3bbc4913a2d20
diff --git a/encryptedstore/src/main.rs b/encryptedstore/src/main.rs
index 96c80db..b7ba9e0 100644
--- a/encryptedstore/src/main.rs
+++ b/encryptedstore/src/main.rs
@@ -125,6 +125,7 @@
let mkfs_options = [
"-j", // Create appropriate sized journal
"-O metadata_csum", // Metadata checksum for filesystem integrity
+ "-b 4096", // block size in the filesystem
];
let mut cmd = Command::new(MK2FS_BIN);
let status = cmd