代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/blktrace 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 1836be5d99c9362f1e2b39206c95270f19cb7faa Mon Sep 17 00:00:00 2001
From: Eric Sandeen <sandeen@redhat.com>
Date: Wed, 5 Jun 2024 23:07:27 -0500
Subject: [PATCH 5/5] fix hang when BLKTRACESETUP fails and "-o -" is used
# blktrace -o - /dev/sda /dev/sdb /dev/sdc
has to be SIGKILLed if BLKTRACESETUP fails for any or all of the devices
listed. (I simulated this by just catching one of the devices in
setup_buts(), skipping the ioctl, and doing ret++).
This seems to be because with "-o -" on the command line, use_tracer_devpaths()
sees piped_output set, so we call process_trace_bufs which ends up waiting on
(!done) and "done" is never set. i.e.
atexit(exit_tracing)
wait_tracers
if (use_tracer_devpaths()) // true because "-o -"
process_trace_bufs
while (wait_empty_entries())
wait_empty_entries
while (!done ... )
<loop forever>
I think this can be avoided by just setting "done = 1" before returning
when setup_buts() fails in run_tracers().
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Jeff Moyer <jmoyer@redhat.com>
Link: https://lore.kernel.org/r/f3204c9d-1384-40b5-a5fb-3bb967ca2bec@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
---
blktrace.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/blktrace.c b/blktrace.c
index 3444fbb..038b2cb 100644
--- a/blktrace.c
+++ b/blktrace.c
@@ -2684,8 +2684,10 @@ static int run_tracers(void)
if (net_mode == Net_client)
printf("blktrace: connecting to %s\n", hostname);
- if (setup_buts())
+ if (setup_buts()) {
+ done = 1;
return 1;
+ }
if (use_tracer_devpaths()) {
if (setup_tracer_devpaths())
--
2.33.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。