mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-12 08:06:54 +00:00
This reverts commit 4f73760a45.
This commit is contained in:
@@ -167,19 +167,8 @@ async fn write_data_blocks<W>(
|
||||
where
|
||||
W: tokio::io::AsyncWrite + Send + Sync + Unpin,
|
||||
{
|
||||
let available = get_data_block_len(en_blocks, data_blocks);
|
||||
if available < length {
|
||||
let block_sizes: Vec<usize> = en_blocks
|
||||
.iter()
|
||||
.take(data_blocks)
|
||||
.map(|block| block.as_ref().map(|buf| buf.len()).unwrap_or(0))
|
||||
.collect();
|
||||
error!(
|
||||
expected = length,
|
||||
available,
|
||||
?block_sizes,
|
||||
"write_data_blocks get_data_block_len < length"
|
||||
);
|
||||
if get_data_block_len(en_blocks, data_blocks) < length {
|
||||
error!("write_data_blocks get_data_block_len < length");
|
||||
return Err(io::Error::new(ErrorKind::UnexpectedEof, "Not enough data blocks to write"));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user