From 4d486e8be44e6b64e87dccf42adfc9719356f468 Mon Sep 17 00:00:00 2001 From: Stanislav Ravas Date: Tue, 7 May 2024 00:05:13 +0200 Subject: [PATCH 1/2] feat: impl Send for Allocation if Storage is Send --- src/fs.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/fs.rs b/src/fs.rs index 873d54302..6c296c801 100644 --- a/src/fs.rs +++ b/src/fs.rs @@ -50,6 +50,8 @@ pub struct Allocation { state: ll::lfs_t, } +unsafe impl Send for Allocation {} + // pub fn check_storage_requirements( impl Default for Allocation { From aaf76ec5264a308e0707939cb334a1439f336658 Mon Sep 17 00:00:00 2001 From: Stanislav Ravas Date: Tue, 7 May 2024 00:09:09 +0200 Subject: [PATCH 2/2] feat: initial support for upstream lfs v2.9.3 There are new fields in lfs_config that needs to be initialized. --- Cargo.toml | 2 +- src/fs.rs | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 1cc635dfb..9f1324ffc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,7 +22,7 @@ default-features = false version = "0.2" [dependencies.littlefs2-sys] -version = "0.1.6" +version = "0.2.0" [dependencies.serde] version = "1" diff --git a/src/fs.rs b/src/fs.rs index 6c296c801..e973a467a 100644 --- a/src/fs.rs +++ b/src/fs.rs @@ -131,6 +131,7 @@ impl Allocation { block_cycles, cache_size, lookahead_size, + compact_thresh: u32::MAX, read_buffer: core::ptr::null_mut(), prog_buffer: core::ptr::null_mut(), @@ -139,6 +140,8 @@ impl Allocation { name_max: filename_max_plus_one.wrapping_sub(1), file_max, attr_max, + metadata_max: 0, + inline_max: u32::MAX, }; Self {