qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCHv2 10/11] iscsi: ignore aio_discard if unsupporte


From: Kevin Wolf
Subject: Re: [Qemu-devel] [PATCHv2 10/11] iscsi: ignore aio_discard if unsupported
Date: Wed, 10 Jul 2013 16:28:07 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Am 10.07.2013 um 16:04 hat Peter Lieven geschrieben:
> Am 10.07.2013 13:33, schrieb Kevin Wolf:
> > Am 27.06.2013 um 15:11 hat Peter Lieven geschrieben:
> >> if the target does not support UNMAP or the request
> >> is too big silently ignore the discard request.
> >>
> >> Signed-off-by: Peter Lieven <address@hidden>
> > Why not loop for the "too big" case? You can probably use the same logic
> > for unmapping the whole device in .bdrv_create and here.
> right, but looping in an aio function seemed not so trivial to me.
> it seems more and more obvious to me that the best would be to change
> all the remaining aio routines to co routines.

The pattern for AIO functions is that the real work of submitting
requests is done in the AIO callback, and it submits new AIO requests
calling back into the same callback as long as acb->remaining_secs > 0
(or something like that).

You can still see that kind of thing alive in qed_aio_next_io(), (most
of?) the rest is converted to coroutines because it makes the code look
nicer.

> in this case i could add the too big logic in iscsi_co_discard and simply call
> it from iscsi_co_write_zeroes.

I think that would be the nicest solution.

Kevin



reply via email to

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