New option "--direct-io".
This commit is contained in:
@@ -93,6 +93,8 @@ void display_help(void)
|
||||
N_("stop after --size bytes have been transferred")},
|
||||
{"-Y", "--sync", 0,
|
||||
N_("flush cache to disk after every write")},
|
||||
{"-K", "--direct-io", 0,
|
||||
N_("use direct I/O to bypass cache")},
|
||||
#ifdef HAVE_IPC
|
||||
{"-R", "--remote", N_("PID"),
|
||||
N_("update settings of process PID")},
|
||||
|
||||
@@ -202,6 +202,7 @@ int main(int argc, char **argv)
|
||||
pv_state_skip_errors_set(state, opts->skip_errors);
|
||||
pv_state_stop_at_size_set(state, opts->stop_at_size);
|
||||
pv_state_sync_after_write_set(state, opts->sync_after_write);
|
||||
pv_state_direct_io_set(state, opts->direct_io);
|
||||
pv_state_rate_limit_set(state, opts->rate_limit);
|
||||
pv_state_target_buffer_size_set(state, opts->buffer_size);
|
||||
pv_state_no_splice_set(state, opts->no_splice);
|
||||
|
||||
+5
-1
@@ -83,6 +83,7 @@ opts_t opts_parse(int argc, char **argv)
|
||||
{"skip-errors", 0, NULL, (int) 'E'},
|
||||
{"stop-at-size", 0, NULL, (int) 'S'},
|
||||
{"sync", 0, NULL, (int) 'Y'},
|
||||
{"direct-io", 0, NULL, (int) 'K'},
|
||||
{"remote", 1, NULL, (int) 'R'},
|
||||
{"pidfile", 1, NULL, (int) 'P'},
|
||||
{"watchfd", 1, NULL, (int) 'd'},
|
||||
@@ -92,7 +93,7 @@ opts_t opts_parse(int argc, char **argv)
|
||||
int option_index = 0;
|
||||
#endif
|
||||
char *short_options =
|
||||
"hVpteIrab8TA:fnqcWD:s:l0i:w:H:N:F:L:B:CESYR:P:d:m:";
|
||||
"hVpteIrab8TA:fnqcWD:s:l0i:w:H:N:F:L:B:CESYKR:P:d:m:";
|
||||
int c, numopts;
|
||||
unsigned int check_pid;
|
||||
int check_fd;
|
||||
@@ -337,6 +338,9 @@ opts_t opts_parse(int argc, char **argv)
|
||||
case 'Y':
|
||||
opts->sync_after_write = true;
|
||||
break;
|
||||
case 'K':
|
||||
opts->direct_io = true;
|
||||
break;
|
||||
case 'R':
|
||||
opts->remote = pv_getnum_ui(optarg);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user