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