Jens Axboe wrote:
On Tue, Dec 15 2009, 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:
. Disable non-working "kill" option;
. Update documentation, advise to send SIGINT signal
via kill(1) to the running background blktrace for
its correct termination.
Patch does not compile:
gcc -o blktrace.o -c -Wall -O2 -g -W -D_GNU_SOURCE -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 blktrace.c
blktrace.c:446: error: stray ?#? in program
blktrace.c:453: error: expected ?,? or ?;? before ?if?
blktrace.c:454: error: stray ?#? in program
make: *** [blktrace.o] Error 1
"\t-D Directory to prepend to output file names\n" \
#if KILL_OPT_ENABLED
"\t-k Kill a running trace\n" \
#endif /* KILL_OPT_ENABLED */
"\t-w Stop after defined time, in seconds\n" \
oops, sorry: wrong stuff.
I'll resend the correct one.
Edward.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrace" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html