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: Kevin Wolf
Subject: Re: [Qemu-devel] [PATCH v2 08/16] block: raw-posix image file reopen
Date: Fri, 14 Sep 2012 09:32:48 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120605 Thunderbird/13.0

Am 13.09.2012 18:57, schrieb Jeff Cody:
> 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.

Sounds good, but please make removing aligned_buf a separate patch.

Kevin



reply via email to

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