[all (rust)] Make sync-io the default
Multithreaded sync-io has performance similar to async-io. Also,
sync-io saves the hassle of setting ulimits to get io_uring working
on some systems (commit ba7fd7b
). Now we default to sync-io, and
leave async-io as a hidden option for testing and benchmarking.
This commit is contained in:
@ -16,6 +16,12 @@ fn main() {
|
||||
let parser = App::new("thin_check")
|
||||
.version(thinp::version::tools_version())
|
||||
.about("Validates thin provisioning metadata on a device or file.")
|
||||
.arg(
|
||||
Arg::with_name("ASYNC_IO")
|
||||
.help("Force use of io_uring for synchronous io")
|
||||
.long("async-io")
|
||||
.hidden(true),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("QUIET")
|
||||
.help("Suppress output messages, return only exit code.")
|
||||
@ -66,16 +72,6 @@ fn main() {
|
||||
.help("Specify the input device to check")
|
||||
.required(true)
|
||||
.index(1),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("ASYNC_IO")
|
||||
.help("Force use of io_uring for asynchronous IO")
|
||||
.long("async-io"),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("SYNC_IO")
|
||||
.help("Force use of synchronous IO (currently the default)")
|
||||
.long("sync-io"),
|
||||
);
|
||||
|
||||
let matches = parser.get_matches();
|
||||
@ -96,11 +92,6 @@ fn main() {
|
||||
report = Arc::new(mk_simple_report());
|
||||
}
|
||||
|
||||
if matches.is_present("SYNC_IO") && matches.is_present("ASYNC_IO") {
|
||||
eprintln!("--sync-io and --async-io may not be used at the same time.");
|
||||
process::exit(1);
|
||||
}
|
||||
|
||||
let engine: Arc<dyn IoEngine + Send + Sync>;
|
||||
|
||||
if matches.is_present("ASYNC_IO") {
|
||||
|
Reference in New Issue
Block a user