We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1b9fa5c commit 2c836dbCopy full SHA for 2c836db
src/fat/volume.rs
@@ -1029,15 +1029,12 @@ impl FatVolume {
1029
*number_free_cluster -= 1;
1030
};
1031
if zero {
1032
- let blocks = [Block::new()];
1033
let start_block_idx = self.cluster_to_block(new_cluster);
1034
let num_blocks = BlockCount(u32::from(self.blocks_per_cluster));
1035
for block_idx in start_block_idx.range(num_blocks) {
1036
- trace!("Zeroing cluster");
1037
- block_cache
1038
- .block_device()
1039
- .write(&blocks, block_idx)
1040
- .map_err(Error::DeviceError)?;
+ trace!("Zeroing cluster {:?}", block_idx);
+ let _block = block_cache.blank_mut(block_idx);
+ block_cache.write_back()?;
1041
}
1042
1043
debug!("All done, returning {:?}", new_cluster);
0 commit comments