fix atomic

This commit is contained in:
2025-12-10 21:15:39 +01:00
parent a4f15460d3
commit 4b0ec380b1
6 changed files with 134 additions and 19 deletions

View File

@ -286,7 +286,9 @@ unsigned int Shred::uiCalcChecksum(fileDescriptor file, Drive *drive, int *ipSig
ulDriveByteCounter += iReadBytes;
ulDriveByteOverallCount += iReadBytes;
d32Percent = this->calcProgress();
drive->sShredSpeed.ulSpeedMetricBytesWritten += iReadBytes;
auto shredSpeed = drive->sShredSpeed.load();
shredSpeed.ulSpeedMetricBytesWritten += iReadBytes;
drive->sShredSpeed.store(shredSpeed);
#ifdef LOG_LEVEL_HIGH
Logger::logThis()->info("Shred-Task (Checksum): ByteCount: " + to_string(ulDriveByteCounter) + " - progress: " + to_string(d32Percent) + " - Drive: " + drive->getSerial());