-
Notifications
You must be signed in to change notification settings - Fork 218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid using zero buffer when generating test files #190
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1734,7 +1734,7 @@ DWORD IORequestGenerator::_CreateDirectoryPath(const char *pszPath) const | |
// | ||
bool IORequestGenerator::_CreateFile(UINT64 ullFileSize, const char *pszFilename, bool fZeroBuffers, bool fVerbose) const | ||
{ | ||
bool fSlowWrites = false; | ||
bool fSlowWrites = true; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why slow writes should be default mode? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Below code block setting fSlowWrites =true if SetPrivilige fails also became wrong since fSlowWrites would be true there anyway |
||
PrintVerbose(fVerbose, "Creating file '%s' of size %I64u.\n", pszFilename, ullFileSize); | ||
|
||
//enable SE_MANAGE_VOLUME_NAME privilege, required to set valid size of a file | ||
|
@@ -1832,7 +1832,7 @@ bool IORequestGenerator::_CreateFile(UINT64 ullFileSize, const char *pszFilename | |
vector<BYTE> vBuf(ulBufSize); | ||
for (UINT32 i=0; i<ulBufSize; ++i) | ||
{ | ||
vBuf[i] = fZeroBuffers ? 0 : (BYTE)(i&0xFF); | ||
vBuf[i] = (BYTE)(i&0xFF); | ||
} | ||
|
||
ullRemainSize = ullFileSize; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fZeroBuffers is not used any more at all