From: Edward Shishkin <edward@redhat.com>
To: linux-btrace@vger.kernel.org
Subject: [patch] blktrace: unblock tracers in the case of unsuccess
Date: Thu, 08 Jul 2010 13:27:31 +0000 [thread overview]
Message-ID: <4C35D243.3050109@redhat.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 103 bytes --]
Hello.
Please consider/apply
Thanks
--
Edward O. Shishkin
Principal Software Engineer
Red Hat Czech
[-- Attachment #2: 7-blktrace-fix-595356.patch --]
[-- Type: text/plain, Size: 1216 bytes --]
Fixup for bz 595356
Problem. Steps to Reproduce:
---
# blktrace -d /dev/sda -w 30
# rm -f sda.blktrace.0
# mkdir sda.blktrace.0
# blktrace -d /dev/sda -w 30
Open output file ./sda.blktrace.0 failed: 21/Is a directory
FAILED to start thread on CPU 0: 1/Operation not permitted
blktrace does not end after 30 seconds, it will be running
until you kill it. Moreover, next attempts to run blktrace
failed with error.
The bug:
---
If open_ios() fails, then tracer_wait_unblock() in the
thread_main() waits for event, wich will never occur:
in the case of unsuccess tracers are not unblocked.
Fixup:
---
Make sure unblock_tracers() is also called in the case on
unsuccess (when nthreads_running != ncpus).
---
Signed-off-by: Edward Shishkin <edward@redhat.com>
---
--- blktrace-1.0.1.orig/blktrace.c
+++ blktrace-1.0.1/blktrace.c
@@ -1848,7 +1848,7 @@
for (cpu = 0; cpu < ncpus; cpu++)
if (start_tracer(cpu))
- break;
+ return;
wait_tracers_ready(cpu);
@@ -2589,8 +2589,8 @@
}
start_tracers();
- if (nthreads_running == ncpus) {
- unblock_tracers();
+ unblock_tracers();
+ if (nthreads_running == ncpus) {
start_buts();
if (net_mode == Net_client)
printf("blktrace: connected!\n");
reply other threads:[~2010-07-08 13:27 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C35D243.3050109@redhat.com \
--to=edward@redhat.com \
--cc=linux-btrace@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.