diff options
Diffstat (limited to 'block/iscsi.c')
-rw-r--r-- | block/iscsi.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/block/iscsi.c b/block/iscsi.c index a4e3730a82..1924a2b58e 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -344,6 +344,8 @@ static void iscsi_timed_check_events(void *opaque) { IscsiLun *iscsilun = opaque; + qemu_mutex_lock(&iscsilun->mutex); + /* check for timed out requests */ iscsi_service(iscsilun->iscsi, 0); @@ -356,6 +358,8 @@ static void iscsi_timed_check_events(void *opaque) * to return to service once this situation changes. */ iscsi_set_events(iscsilun); + qemu_mutex_unlock(&iscsilun->mutex); + timer_mod(iscsilun->event_timer, qemu_clock_get_ms(QEMU_CLOCK_REALTIME) + EVENT_INTERVAL); } |