Changed sync from 0 (at end) to every 1000000 blks

Instead of defaulting to only calling fdatasync at the end of a wipe, it now defaults to calling fdatasync every 1000000 blocks. This shows a unresponsive drive far quicker and also allows wipe threads to complete and be cancelled within a couple of seconds if a wipe is aborted with control-c.
This commit is contained in:
PartialVolume
2019-11-08 13:18:50 +00:00
committed by GitHub
parent f9f0ec605c
commit 2a056b7bfa

View File

@@ -111,7 +111,7 @@ int nwipe_options_parse( int argc, char** argv )
nwipe_options.nowait = 0;
nwipe_options.nosignals = 0;
nwipe_options.nogui = 0;
nwipe_options.sync = 0;
nwipe_options.sync = 100000;
nwipe_options.verify = NWIPE_VERIFY_LAST;
memset( nwipe_options.logfile, '\0', sizeof( nwipe_options.logfile ) );