[Top][All Lists]
[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
- Re: [Qemu-devel] [PATCH v2 06/16] block: do not parse BDRV_O_CACHE_WB in raw block drivers, (continued)
[Qemu-devel] [PATCH v2 08/16] block: raw-posix image file reopen, Jeff Cody, 2012/09/13
[Qemu-devel] [PATCH v2 07/16] block: move allocating aligned_buf into a helper function in raw_posix.c, Jeff Cody, 2012/09/13
[Qemu-devel] [PATCH v2 11/16] block: qcow2 image file reopen, Jeff Cody, 2012/09/13
[Qemu-devel] [PATCH v2 16/16] block: remove keep_read_only flag from BlockDriverState struct, Jeff Cody, 2012/09/13
[Qemu-devel] [PATCH v2 05/16] block: move open flag parsing in raw block drivers to helper functions, Jeff Cody, 2012/09/13
[Qemu-devel] [PATCH v2 15/16] block: convert bdrv_commit() to use bdrv_reopen(), Jeff Cody, 2012/09/13
[Qemu-devel] [PATCH v2 14/16] block: raw-win32 driver reopen support, Jeff Cody, 2012/09/13
[Qemu-devel] [PATCH v2 12/16] block: qcow image file reopen, Jeff Cody, 2012/09/13
[Qemu-devel] [PATCH v2 13/16] block: vmdk image file reopen, Jeff Cody, 2012/09/13