* [patch] blktrace: disable kill option - take 2
@ 2010-04-20 13:27 Edward Shishkin
2010-04-20 13:41 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Edward Shishkin @ 2010-04-20 13:27 UTC (permalink / raw)
To: linux-btrace
[-- Attachment #1: Type: text/plain, Size: 1 bytes --]
[-- Attachment #2: blktrace-fix-513950.patch --]
[-- Type: text/plain, Size: 2485 bytes --]
Fixup for 513950.
Problem:
'blktrace -d <device> -k' does not kill a running
backgound trace. Executing 'blktrace -d <device> -k'
for the second time results in "BLKTRACETEARDOWN:
Invalid argument" message and then each run of
blktrace on that machine prints the following output:
BLKTRACESETUP: No such file or directory.
The bug:
The option -k results in clobbering information
about running trace by kernel (blk_trace_remove),
while resources (files open in debugfs by the running
background blktrace) are not released.
Solution:
Update documentation:
Undocument the non-working "kill" option. Advise
to send SIGINT signall via kill(1) to the running
background blktrace for its correct termination.
Signed-off-by: Edward Shishkin <edward@redhat.com>
---
blktrace.c | 1 -
doc/blktrace.8 | 24 ++++--------------------
2 files changed, 4 insertions(+), 21 deletions(-)
--- blktrace.orig/blktrace.c
+++ blktrace/blktrace.c
@@ -442,7 +442,6 @@ static char usage_str[] = \
"\t-r Path to mounted debugfs, defaults to /sys/kernel/debug\n" \
"\t-o File(s) to send output to\n" \
"\t-D Directory to prepend to output file names\n" \
- "\t-k Kill a running trace\n" \
"\t-w Stop after defined time, in seconds\n" \
"\t-a Only trace specified actions. See documentation\n" \
"\t-A Give trace mask as a single value. See documentation\n" \
--- blktrace.orig/doc/blktrace.8
+++ blktrace/doc/blktrace.8
@@ -66,19 +66,10 @@ blktrace may also be run concurrently wi
.TP 2
\-
The default behaviour for blktrace is to run forever until explicitly
-killed by the user (via a control-C, or kill utility invocation).
-There are two ways to modify this:
-
-.TP 5
- 1.
-You may utilise the blktrace utility itself to kill
-a running trace -- via the \fB\-k\fR option.
-
-.TP 5
- 2.
-You can specify a run-time duration for blktrace via the
-\fB\-w\fR option -- then blktrace will run for the specified number
-of seconds, and then halt.
+killed by the user (via a control-C, or sending SIGINT signal to the
+process via invocation the kill (1) utility). Also you can specify a
+run-time duration for blktrace via the \fB\-w\fR option -- then
+blktrace will run for the specified number of seconds, and then halt.
.SH OPTIONS
@@ -119,13 +110,6 @@ Adds \fIdev\fR as a device to trace
Adds the devices found in \fIfile\fR as devices to trace
.RE
-\-k
-.br
-\-\-kill
-.RS
-Kill on-going trace
-.RE
-
\-n \fInum\-sub\fR
.br
\-\-num\-sub=\fInum-sub\fR
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [patch] blktrace: disable kill option - take 2
2010-04-20 13:27 [patch] blktrace: disable kill option - take 2 Edward Shishkin
@ 2010-04-20 13:41 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2010-04-20 13:41 UTC (permalink / raw)
To: linux-btrace
On Tue, Apr 20 2010, Edward Shishkin wrote:
>
> Fixup for 513950.
>
> Problem:
> 'blktrace -d <device> -k' does not kill a running
> backgound trace. Executing 'blktrace -d <device> -k'
> for the second time results in "BLKTRACETEARDOWN:
> Invalid argument" message and then each run of
> blktrace on that machine prints the following output:
> BLKTRACESETUP: No such file or directory.
>
> The bug:
> The option -k results in clobbering information
> about running trace by kernel (blk_trace_remove),
> while resources (files open in debugfs by the running
> background blktrace) are not released.
>
> Solution:
> Update documentation:
> Undocument the non-working "kill" option. Advise
> to send SIGINT signall via kill(1) to the running
> background blktrace for its correct termination.
Applied, thanks.
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-04-20 13:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-20 13:27 [patch] blktrace: disable kill option - take 2 Edward Shishkin
2010-04-20 13:41 ` Jens Axboe
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.