qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] iscsi: partly avoid iovec linearization in iscs


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH] iscsi: partly avoid iovec linearization in iscsi_aio_writev
Date: Tue, 20 Nov 2012 16:51:03 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Mon, Nov 19, 2012 at 03:58:31PM +0100, Peter Lieven wrote:
> libiscsi expects all write16 data in a linear buffer. If the
> iovec only contains one buffer we can skip the linearization
> step as well as the additional malloc/free and pass the
> buffer directly.
> 
> Reported-by: Ronnie Sahlberg <address@hidden>
> Signed-off-by: Peter Lieven <address@hidden>
> ---
>  block/iscsi.c |   24 +++++++++++++++---------
>  1 file changed, 15 insertions(+), 9 deletions(-)
> 
> diff --git a/block/iscsi.c b/block/iscsi.c
> index d0b1a10..f12148e 100644
> --- a/block/iscsi.c
> +++ b/block/iscsi.c
> @@ -199,8 +199,10 @@ iscsi_aio_write16_cb(struct iscsi_context *iscsi, int 
> status,
>      trace_iscsi_aio_write16_cb(iscsi, status, acb, acb->canceled);
> -    g_free(acb->buf);
> -
> +    if (acb->buf != NULL) {
> +        g_free(acb->buf);
> +    }
> +

g_free(NULL) is a nop, so this change isn't necessary.  Poalo: Could be
done when merging the patch?

Reviewed-by: Stefan Hajnoczi <address@hidden>



reply via email to

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