From 79971f4310bc3dba0d1cc680f692e7f0128e761d Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Mon, 27 Feb 2006 12:15:49 +0100 Subject: [PATCH] [PATCH] blktrace: make sendfile usage the default --- README | 2 +- blktrace.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README b/README index 4c6d1f7..37e6b65 100644 --- a/README +++ b/README @@ -65,7 +65,7 @@ $ blktrace -d [ -r relay_path ] [ -o output ] [ -k ] [ -w time ] -l Run in network listen mode (blktrace server) -h Run in network client mode, connecting to the given host -p Network port to use (default 8462) - -s Make the network client use sendfile() to transfer data + -s Disable network client use of sendfile() to transfer data -V Print program version info. $ blkparse -i [ -o ] [ -b rb_batch ] [ -s ] [ -t ] [ -q ] diff --git a/blktrace.c b/blktrace.c index 83298d1..47b4d3f 100644 --- a/blktrace.c +++ b/blktrace.c @@ -146,7 +146,7 @@ static struct option l_opts[] = { .val = 'p' }, { - .name = "sendfile", + .name = "no-sendfile", .has_arg = no_argument, .flag = NULL, .val = 's' @@ -292,7 +292,7 @@ enum { static char hostname[MAXHOSTNAMELEN]; static int net_port = TRACE_NET_PORT; static int net_mode = 0; -static int net_use_sendfile; +static int net_use_sendfile = 1; struct net_connection { int in_fd; @@ -1730,7 +1730,7 @@ int main(int argc, char *argv[]) net_port = atoi(optarg); break; case 's': - net_use_sendfile = 1; + net_use_sendfile = 0; break; default: show_usage(argv[0]); -- 2.25.1