qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 08/16] block: raw-posix image file reopen


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH v2 08/16] block: raw-posix image file reopen
Date: Thu, 13 Sep 2012 18:02:28 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120828 Thunderbird/15.0

Il 13/09/2012 17:49, Jeff Cody ha scritto:
> +
> +    /*
> +     * If we didn't have BDRV_O_NOCACHE set before, we may not have allocated
> +     * aligned_buf
> +     */
> +    ret = raw_allocate_aligned_buf(&raw_s->aligned_buf,
> +                                   &raw_s->aligned_buf_size, state->flags);

Aligned_buf is unused, except for checking if it exists here:

    if (s->aligned_buf) {
        if (!qiov_is_aligned(bs, qiov)) {
            type |= QEMU_AIO_MISALIGNED;
#ifdef CONFIG_LINUX_AIO
        } else if (s->use_aio) {
            return laio_submit(bs, s->aio_ctx, s->fd, sector_num, qiov,
                               nb_sectors, cb, opaque, type);
#endif
        }
    }

You can instead check BDRV_O_NOCACHE and kill aligned_buf completely.

Paolo



reply via email to

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