mirror of
https://github.com/cmclark00/retro-imager.git
synced 2025-05-18 07:55:21 +01:00
Linux: enable direct IO for verify
Linux has huge buffer cache (all free memory) So make sure we are reading data back from the actual card instead of cache.
This commit is contained in:
parent
eef90c2adb
commit
b08ed20e5f
1 changed files with 5 additions and 0 deletions
|
@ -603,6 +603,11 @@ bool DownloadThread::_verify()
|
||||||
QElapsedTimer t1;
|
QElapsedTimer t1;
|
||||||
t1.start();
|
t1.start();
|
||||||
|
|
||||||
|
#ifdef Q_OS_LINUX
|
||||||
|
/* Make sure we are reading from the drive and not from cache */
|
||||||
|
fcntl(_file.handle(), F_SETFL, O_DIRECT | fcntl(_file.handle(), F_GETFL));
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!_firstBlock)
|
if (!_firstBlock)
|
||||||
{
|
{
|
||||||
_file.seek(0);
|
_file.seek(0);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue