qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] iscsi: add iscsi_truncate support


From: Peter Lieven
Subject: Re: [Qemu-devel] [PATCH] iscsi: add iscsi_truncate support
Date: Fri, 15 Feb 2013 13:36:36 +0100

Am 15.02.2013 um 13:18 schrieb Kevin Wolf <address@hidden>:

> On Fri, Feb 15, 2013 at 12:54:51PM +0100, Paolo Bonzini wrote:
>> Il 15/02/2013 12:18, Peter Lieven ha scritto:
>>>>> 
>>>>> +    task = iscsi_readcapacity16_task(iscsilun->iscsi, iscsilun->lun,
>>>>> +                                 iscsi_readcapacity16_cb, &itask);
>>>> 
>>>> You can use iscsi_readcapacity16_sync.  In fact, you probably should
>>>> extract code from iscsi_open and reuse it here.
>>> 
>>> Thats not possible afaik. Mixing sync and async commands in libiscsi is
>>> a very bad thing. It will leed to nested event loops.
>> 
>> Ah, I thought qmp_block_resize did a bdrv_drain_all before calling
>> bdrv_truncate.
>> 
>> Maybe it should.  Kevin, what do you think?
> 
> Probably. bdrv_truncate() invalidates the bdrv_check_request() result for
> in-flight requests, so there better be none.

So you would call brdv_drain_all() before calling brdv_truncate and then
use a sync iscsi call?

Peter


> 
> Kevin




reply via email to

[Prev in Thread] Current Thread [Next in Thread]