Skip to content

Commit

Permalink
Switch back to fs2 due to macOS allocation bug (#2589)
Browse files Browse the repository at this point in the history
  • Loading branch information
nazar-pc authored Mar 8, 2024
1 parent 3b077d2 commit 232cb06
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion crates/subspace-farmer-components/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ async-lock = "3.3.0"
async-trait = "0.1.77"
backoff = { version = "0.4.0", features = ["futures", "tokio"] }
bitvec = "1.0.1"
fs4 = "0.8.0"
# TODO: Switch to fs4 once https://github.com/al8n/fs4-rs/issues/15 is resolved
fs2 = "0.4.3"
futures = "0.3.29"
hex = "0.4.3"
libc = "0.2.152"
Expand Down
2 changes: 1 addition & 1 deletion crates/subspace-farmer-components/src/file_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ impl FileExt for File {
if self.size()? == len {
return Ok(());
}
fs4::FileExt::allocate(self, len)
fs2::FileExt::allocate(self, len)
}

#[cfg(target_os = "linux")]
Expand Down
3 changes: 2 additions & 1 deletion crates/subspace-networking/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ clap = { version = "4.4.18", features = ["color", "derive"] }
derive_more = "0.99.17"
either = "1.8.1"
event-listener-primitives = "2.0.1"
fs4 = "0.8.0"
# TODO: Switch to fs4 once https://github.com/al8n/fs4-rs/issues/15 is resolved
fs2 = "0.4.3"
futures = "0.3.29"
futures-timer = "3.0.2"
hex = "0.4.3"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::utils::{AsyncJoinOnDrop, CollectionBatcher, Handler, HandlerFn, PeerAddress};
use async_trait::async_trait;
use event_listener_primitives::HandlerId;
use fs4::FileExt;
use fs2::FileExt;
use futures::future::{pending, Fuse};
use futures::FutureExt;
use libp2p::multiaddr::Protocol;
Expand Down

0 comments on commit 232cb06

Please sign in to comment.