From 30835787c904cd9388aa07d8c2a4c651d3e65621 Mon Sep 17 00:00:00 2001 From: rifsxd Date: Sun, 23 Mar 2025 22:38:01 +0600 Subject: [PATCH] Revert "ksud: determine modules's size by checking partion size" This reverts commit c40bfd694cfd7c4224c419e07992b8a2a5dc9481. --- userspace/ksud_overlayfs/Cargo.lock | 11 ----------- userspace/ksud_overlayfs/Cargo.toml | 1 - userspace/ksud_overlayfs/src/module.rs | 3 +-- 3 files changed, 1 insertion(+), 14 deletions(-) diff --git a/userspace/ksud_overlayfs/Cargo.lock b/userspace/ksud_overlayfs/Cargo.lock index 466e5193..dfa5adaf 100644 --- a/userspace/ksud_overlayfs/Cargo.lock +++ b/userspace/ksud_overlayfs/Cargo.lock @@ -598,16 +598,6 @@ dependencies = [ "miniz_oxide", ] -[[package]] -name = "fs4" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be058769cf1633370c3d0dac6bb9b223b8f18900cf808abadf7843192e706238" -dependencies = [ - "rustix 0.38.44", - "windows-sys 0.59.0", -] - [[package]] name = "generic-array" version = "0.14.7" @@ -816,7 +806,6 @@ dependencies = [ "encoding_rs", "env_logger", "extattr", - "fs4", "getopts", "hole-punch", "humansize", diff --git a/userspace/ksud_overlayfs/Cargo.toml b/userspace/ksud_overlayfs/Cargo.toml index 9fefb6bb..675c2738 100644 --- a/userspace/ksud_overlayfs/Cargo.toml +++ b/userspace/ksud_overlayfs/Cargo.toml @@ -41,7 +41,6 @@ tempfile = "3" chrono = "0.4" hole-punch = { git = "https://github.com/tiann/hole-punch" } regex-lite = "0.1" -fs4 = "0.13" [target.'cfg(any(target_os = "android", target_os = "linux"))'.dependencies] rustix = { git = "https://github.com/Kernel-SU/rustix.git", branch = "main", features = [ diff --git a/userspace/ksud_overlayfs/src/module.rs b/userspace/ksud_overlayfs/src/module.rs index a0b6fbe7..9230dd9a 100644 --- a/userspace/ksud_overlayfs/src/module.rs +++ b/userspace/ksud_overlayfs/src/module.rs @@ -376,8 +376,7 @@ fn _install_module(zip: &str) -> Result<()> { humansize::format_size(zip_uncompressed_size, humansize::DECIMAL) ); - let data_vfs = fs4::statvfs("/data").with_context(|| "Failed to stat /data".to_string())?; - let sparse_image_size = data_vfs.total_space(); + let sparse_image_size = 6 << 30; // 6GB if !modules_img_exist && !modules_update_img_exist { // if no modules and modules_update, it is brand new installation, we should create a new img // create a tmp module img and mount it to modules_update