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: Jeff Cody
Subject: Re: [Qemu-devel] [PATCH v2 08/16] block: raw-posix image file reopen
Date: Thu, 13 Sep 2012 12:57:20 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120828 Thunderbird/15.0

On 09/13/2012 12:02 PM, Paolo Bonzini wrote:
> 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
>

Hmm - yes, it looks like that is so.  This patch will transform into
checking for BDRV_O_NOCACHE as you suggest, and killing aligned_buf.

Thanks,
Jeff




reply via email to

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