Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 573721 Details for
Bug 807898
guest quit or device hot-unplug during streaming fails
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
patch to fix the bug, RHEL version
0001-block.patch (text/plain), 2.68 KB, created by
Paolo Bonzini
on 2012-03-29 15:57:45 UTC
(
hide
)
Description:
patch to fix the bug, RHEL version
Filename:
MIME Type:
Creator:
Paolo Bonzini
Created:
2012-03-29 15:57:45 UTC
Size:
2.68 KB
patch
obsolete
>From 1ac534077e121c12d56400dfaffb1e909b0128e8 Mon Sep 17 00:00:00 2001 >From: Paolo Bonzini <pbonzini@redhat.com> >Date: Thu, 29 Mar 2012 17:45:13 +0200 >Subject: [RHEL 6.3 qemu-kvm PATCH] block > >--- > block.c | 14 ++++++++++++++ > block/stream.c | 4 +++- > block_int.h | 2 ++ > 3 files changed, 19 insertions(+), 1 deletions(-) > >diff --git a/block.c b/block.c >index e3c4f64..348326f 100644 >--- a/block.c >+++ b/block.c >@@ -684,6 +684,9 @@ unlink_and_fail: > void bdrv_close(BlockDriverState *bs) > { > if (bs->drv) { >+ if (bs->job) { >+ block_job_cancel_sync(bs->job); >+ } > if (bs == bs_snapshots) { > bs_snapshots = NULL; > } >@@ -3695,3 +3698,14 @@ bool block_job_is_cancelled(BlockJob *job) > { > return job->cancelled; > } >+ >+void block_job_cancel_sync(BlockJob *job) >+{ >+ BlockDriverState *bs = job->bs; >+ >+ assert(bs->job == job); >+ block_job_cancel(job); >+ while (bs->job != NULL && bs->job->busy) { >+ qemu_aio_wait(); >+ } >+} >diff --git a/block/stream.c b/block/stream.c >index 7f20ba5..063aa80 100644 >--- a/block/stream.c >+++ b/block/stream.c >@@ -175,7 +175,7 @@ retry: > break; > } > >- >+ s->common.busy = true; > if (base) { > ret = is_allocated_base(bs, base, sector_num, > STREAM_BUFFER_SIZE / BDRV_SECTOR_SIZE, &n); >@@ -189,6 +189,7 @@ retry: > if (s->common.speed) { > uint64_t delay_ms = ratelimit_calculate_delay(&s->limit, n); > if (delay_ms > 0) { >+ s->common.busy = false; > co_sleep(rt_clock, delay_ms); > > /* Recheck cancellation and that sectors are unallocated */ >@@ -208,6 +209,7 @@ retry: > /* Note that even when no rate limit is applied we need to yield > * with no pending I/O here so that qemu_aio_flush() returns. > */ >+ s->common.busy = false; > co_sleep(rt_clock, 0); > } > >diff --git a/block_int.h b/block_int.h >index fcfe7d0..e195ffe 100644 >--- a/block_int.h >+++ b/block_int.h >@@ -70,6 +70,7 @@ struct BlockJob { > const BlockJobType *job_type; > BlockDriverState *bs; > bool cancelled; >+ bool busy; > > /* These fields are published by the query-block-jobs QMP API */ > int64_t offset; >@@ -289,6 +290,7 @@ void block_job_complete(BlockJob *job, int ret); > int block_job_set_speed(BlockJob *job, int64_t value); > void block_job_cancel(BlockJob *job); > bool block_job_is_cancelled(BlockJob *job); >+void block_job_cancel_sync(BlockJob *job); > > int stream_start(BlockDriverState *bs, BlockDriverState *base, > const char *base_id, BlockDriverCompletionFunc *cb, >-- >1.7.9.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 807898
:
573530
| 573721