[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: |
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
[Qemu-devel] [PATCH v2 10/16] block: qed image file reopen, Jeff Cody, 2012/09/13
[Qemu-devel] [PATCH v2 09/16] block: raw image file reopen, Jeff Cody, 2012/09/13
[Qemu-devel] [PATCH v2 08/16] block: raw-posix image file reopen, Jeff Cody, 2012/09/13
- Re: [Qemu-devel] [PATCH v2 08/16] block: raw-posix image file reopen,
Paolo Bonzini <=
[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