Skip to content

Commit

Permalink
topology: Use bigger buffer to detect btrfs
Browse files Browse the repository at this point in the history
Signed-off-by: Ikey Doherty <ikey@serpentos.com>
  • Loading branch information
ikeycode committed May 19, 2024
1 parent fe51dc4 commit 25de563
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions blsforme/src/topology.rs
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,8 @@ impl Topology {
let path = path.as_ref();
log::trace!("Querying superblock information for {}", path.display());
let fi = fs::File::open(path)?;
let mut buffer: Vec<u8> = Vec::with_capacity(2048);
fi.take(2048).read_to_end(&mut buffer)?;
let mut buffer: Vec<u8> = Vec::with_capacity(2 * 1024 * 1024);
fi.take(2 * 1024 * 1024).read_to_end(&mut buffer)?;
let mut cursor = Cursor::new(&buffer);
let sb = superblock::for_reader(&mut cursor)?;
log::trace!("detected superblock: {}", sb.kind());
Expand Down

0 comments on commit 25de563

Please sign in to comment.