[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 09/19] block: purge s->aligned_buf and s->aligned_bu
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PATCH 09/19] block: purge s->aligned_buf and s->aligned_buf_size from raw-posix.c |
Date: |
Mon, 24 Sep 2012 16:26:38 +0200 |
From: Jeff Cody <address@hidden>
The aligned_buf pointer and aligned_buf size are no longer used in
raw_posix.c, so remove all references to them.
Signed-off-by: Jeff Cody <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block/raw-posix.c | 21 +--------------------
1 files changed, 1 insertions(+), 20 deletions(-)
diff --git a/block/raw-posix.c b/block/raw-posix.c
index 1e727eb..0ffb3d0 100644
--- a/block/raw-posix.c
+++ b/block/raw-posix.c
@@ -133,8 +133,6 @@ typedef struct BDRVRawState {
int use_aio;
void *aio_ctx;
#endif
- uint8_t *aligned_buf;
- unsigned aligned_buf_size;
#ifdef CONFIG_XFS
bool is_xfs : 1;
#endif
@@ -259,23 +257,10 @@ static int raw_open_common(BlockDriverState *bs, const
char *filename,
return ret;
}
s->fd = fd;
- s->aligned_buf = NULL;
-
- if ((bdrv_flags & BDRV_O_NOCACHE)) {
- /*
- * Allocate a buffer for read/modify/write cycles. Chose the size
- * pessimistically as we don't know the block size yet.
- */
- s->aligned_buf_size = 32 * MAX_BLOCKSIZE;
- s->aligned_buf = qemu_memalign(MAX_BLOCKSIZE, s->aligned_buf_size);
- if (s->aligned_buf == NULL) {
- goto out_close;
- }
- }
/* We're falling back to POSIX AIO in some cases so init always */
if (paio_init() < 0) {
- goto out_free_buf;
+ goto out_close;
}
#ifdef CONFIG_LINUX_AIO
@@ -292,8 +277,6 @@ static int raw_open_common(BlockDriverState *bs, const char
*filename,
return 0;
-out_free_buf:
- qemu_vfree(s->aligned_buf);
out_close:
qemu_close(fd);
return -errno;
@@ -402,8 +385,6 @@ static void raw_close(BlockDriverState *bs)
if (s->fd >= 0) {
qemu_close(s->fd);
s->fd = -1;
- if (s->aligned_buf != NULL)
- qemu_vfree(s->aligned_buf);
}
}
--
1.7.6.5
- [Qemu-devel] [PATCH 01/19] blockdev: preserve readonly and snapshot states across media changes, (continued)
- [Qemu-devel] [PATCH 01/19] blockdev: preserve readonly and snapshot states across media changes, Kevin Wolf, 2012/09/24
- [Qemu-devel] [PATCH 02/19] block: correctly set the keep_read_only flag, Kevin Wolf, 2012/09/24
- [Qemu-devel] [PATCH 03/19] block: make bdrv_set_enable_write_cache() modify open_flags, Kevin Wolf, 2012/09/24
- [Qemu-devel] [PATCH 10/19] block: raw-posix image file reopen, Kevin Wolf, 2012/09/24
- [Qemu-devel] [PATCH 05/19] block: move aio initialization into a helper function, Kevin Wolf, 2012/09/24
- [Qemu-devel] [PATCH 13/19] block: qcow2 image file reopen, Kevin Wolf, 2012/09/24
- [Qemu-devel] [PATCH 06/19] block: move open flag parsing in raw block drivers to helper functions, Kevin Wolf, 2012/09/24
- [Qemu-devel] [PATCH 08/19] block: use BDRV_O_NOCACHE instead of s->aligned_buf in raw-posix.c, Kevin Wolf, 2012/09/24
- [Qemu-devel] [PATCH 12/19] block: qed image file reopen, Kevin Wolf, 2012/09/24
- [Qemu-devel] [PATCH 11/19] block: raw image file reopen, Kevin Wolf, 2012/09/24
- [Qemu-devel] [PATCH 09/19] block: purge s->aligned_buf and s->aligned_buf_size from raw-posix.c,
Kevin Wolf <=
- [Qemu-devel] [PATCH 07/19] block: do not parse BDRV_O_CACHE_WB in block drivers, Kevin Wolf, 2012/09/24
- [Qemu-devel] [PATCH 18/19] block: convert bdrv_commit() to use bdrv_reopen(), Kevin Wolf, 2012/09/24
- [Qemu-devel] [PATCH 04/19] block: Framework for reopening files safely, Kevin Wolf, 2012/09/24
- [Qemu-devel] [PATCH 14/19] block: qcow image file reopen, Kevin Wolf, 2012/09/24
- [Qemu-devel] [PATCH 15/19] block: vmdk image file reopen, Kevin Wolf, 2012/09/24
- [Qemu-devel] [PATCH 17/19] block: vpc image file reopen, Kevin Wolf, 2012/09/24
- [Qemu-devel] [PATCH 16/19] block: vdi image file reopen, Kevin Wolf, 2012/09/24
- [Qemu-devel] [PATCH 19/19] block: remove keep_read_only flag from BlockDriverState struct, Kevin Wolf, 2012/09/24
- Re: [Qemu-devel] [PULL 00/19] Block patches, Anthony Liguori, 2012/09/25