* [Qemu-devel] [PATCH 1/3] block: removed unused function
2011-07-27 18:11 [Qemu-devel] [PATCH 0/3] small trivial patches Frediano Ziglio
@ 2011-07-27 18:12 ` Frediano Ziglio
2011-07-27 18:12 ` [Qemu-devel] [PATCH 2/3] block: typo fix Frediano Ziglio
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Frediano Ziglio @ 2011-07-27 18:12 UTC (permalink / raw)
To: Stefan Hajnoczi; +Cc: qemu-trivial, qemu-devel, Frediano Ziglio
Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
---
block.c | 13 -------------
block.h | 2 --
2 files changed, 0 insertions(+), 15 deletions(-)
diff --git a/block.c b/block.c
index 9549b9e..b2d3983 100644
--- a/block.c
+++ b/block.c
@@ -1108,19 +1108,6 @@ int bdrv_pwrite_sync(BlockDriverState *bs, int64_t offset,
return 0;
}
-/*
- * Writes to the file and ensures that no writes are reordered across this
- * request (acts as a barrier)
- *
- * Returns 0 on success, -errno in error cases.
- */
-int bdrv_write_sync(BlockDriverState *bs, int64_t sector_num,
- const uint8_t *buf, int nb_sectors)
-{
- return bdrv_pwrite_sync(bs, BDRV_SECTOR_SIZE * sector_num,
- buf, BDRV_SECTOR_SIZE * nb_sectors);
-}
-
/**
* Truncate file to 'offset' bytes (needed only for file protocols)
*/
diff --git a/block.h b/block.h
index 59cc410..e672bc6 100644
--- a/block.h
+++ b/block.h
@@ -85,8 +85,6 @@ int bdrv_pwrite(BlockDriverState *bs, int64_t offset,
const void *buf, int count);
int bdrv_pwrite_sync(BlockDriverState *bs, int64_t offset,
const void *buf, int count);
-int bdrv_write_sync(BlockDriverState *bs, int64_t sector_num,
- const uint8_t *buf, int nb_sectors);
int bdrv_truncate(BlockDriverState *bs, int64_t offset);
int64_t bdrv_getlength(BlockDriverState *bs);
int64_t bdrv_get_allocated_file_size(BlockDriverState *bs);
--
1.7.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Qemu-devel] [PATCH 2/3] block: typo fix
2011-07-27 18:11 [Qemu-devel] [PATCH 0/3] small trivial patches Frediano Ziglio
2011-07-27 18:12 ` [Qemu-devel] [PATCH 1/3] block: removed unused function Frediano Ziglio
@ 2011-07-27 18:12 ` Frediano Ziglio
2011-07-27 18:12 ` [Qemu-devel] [PATCH 3/3] aio: always check paio_init result Frediano Ziglio
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Frediano Ziglio @ 2011-07-27 18:12 UTC (permalink / raw)
To: Stefan Hajnoczi; +Cc: qemu-trivial, qemu-devel, Frediano Ziglio
Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
---
block/raw-posix.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/block/raw-posix.c b/block/raw-posix.c
index cd89c83..275b41e 100644
--- a/block/raw-posix.c
+++ b/block/raw-posix.c
@@ -587,7 +587,7 @@ static BlockDriverAIOCB *raw_aio_submit(BlockDriverState *bs,
/*
* If O_DIRECT is used the buffer needs to be aligned on a sector
- * boundary. Check if this is the case or telll the low-level
+ * boundary. Check if this is the case or tell the low-level
* driver that it needs to copy the buffer.
*/
if (s->aligned_buf) {
--
1.7.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Qemu-devel] [PATCH 3/3] aio: always check paio_init result
2011-07-27 18:11 [Qemu-devel] [PATCH 0/3] small trivial patches Frediano Ziglio
2011-07-27 18:12 ` [Qemu-devel] [PATCH 1/3] block: removed unused function Frediano Ziglio
2011-07-27 18:12 ` [Qemu-devel] [PATCH 2/3] block: typo fix Frediano Ziglio
@ 2011-07-27 18:12 ` Frediano Ziglio
2011-07-29 10:02 ` [Qemu-devel] [PATCH 0/3] small trivial patches Stefan Hajnoczi
2011-07-29 13:30 ` Kevin Wolf
4 siblings, 0 replies; 6+ messages in thread
From: Frediano Ziglio @ 2011-07-27 18:12 UTC (permalink / raw)
To: Stefan Hajnoczi; +Cc: qemu-trivial, qemu-devel, Frediano Ziglio
Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
---
block/raw-posix.c | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/block/raw-posix.c b/block/raw-posix.c
index 275b41e..3c6bd4b 100644
--- a/block/raw-posix.c
+++ b/block/raw-posix.c
@@ -230,13 +230,15 @@ static int raw_open_common(BlockDriverState *bs, const char *filename,
}
}
+ /* We're falling back to POSIX AIO in some cases so init always */
+ if (paio_init() < 0) {
+ goto out_free_buf;
+ }
+
#ifdef CONFIG_LINUX_AIO
if ((bdrv_flags & (BDRV_O_NOCACHE|BDRV_O_NATIVE_AIO)) ==
(BDRV_O_NOCACHE|BDRV_O_NATIVE_AIO)) {
- /* We're falling back to POSIX AIO in some cases */
- paio_init();
-
s->aio_ctx = laio_init();
if (!s->aio_ctx) {
goto out_free_buf;
@@ -245,9 +247,6 @@ static int raw_open_common(BlockDriverState *bs, const char *filename,
} else
#endif
{
- if (paio_init() < 0) {
- goto out_free_buf;
- }
#ifdef CONFIG_LINUX_AIO
s->use_aio = 0;
#endif
--
1.7.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH 0/3] small trivial patches
2011-07-27 18:11 [Qemu-devel] [PATCH 0/3] small trivial patches Frediano Ziglio
` (2 preceding siblings ...)
2011-07-27 18:12 ` [Qemu-devel] [PATCH 3/3] aio: always check paio_init result Frediano Ziglio
@ 2011-07-29 10:02 ` Stefan Hajnoczi
2011-07-29 13:30 ` Kevin Wolf
4 siblings, 0 replies; 6+ messages in thread
From: Stefan Hajnoczi @ 2011-07-29 10:02 UTC (permalink / raw)
To: Frediano Ziglio; +Cc: qemu-trivial, Kevin Wolf, qemu-devel
On Wed, Jul 27, 2011 at 7:11 PM, Frediano Ziglio <freddy77@gmail.com> wrote:
> Minor fixes and improves
>
> Frediano Ziglio (3):
> block: removed unused function
> block: typo fix
> aio: always check paio_init result
>
> block.c | 13 -------------
> block.h | 2 --
> block/raw-posix.c | 13 ++++++-------
> 3 files changed, 6 insertions(+), 22 deletions(-)
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Please send block patches to Kevin even if they are trivial. The
trivial-patches tree tries to stay out of the way of subsystems with
an active maintainer.
Stefan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH 0/3] small trivial patches
2011-07-27 18:11 [Qemu-devel] [PATCH 0/3] small trivial patches Frediano Ziglio
` (3 preceding siblings ...)
2011-07-29 10:02 ` [Qemu-devel] [PATCH 0/3] small trivial patches Stefan Hajnoczi
@ 2011-07-29 13:30 ` Kevin Wolf
4 siblings, 0 replies; 6+ messages in thread
From: Kevin Wolf @ 2011-07-29 13:30 UTC (permalink / raw)
To: Frediano Ziglio; +Cc: qemu-trivial, Stefan Hajnoczi, qemu-devel
Am 27.07.2011 20:11, schrieb Frediano Ziglio:
> Minor fixes and improves
>
> Frediano Ziglio (3):
> block: removed unused function
> block: typo fix
> aio: always check paio_init result
>
> block.c | 13 -------------
> block.h | 2 --
> block/raw-posix.c | 13 ++++++-------
> 3 files changed, 6 insertions(+), 22 deletions(-)
Thanks, applied all to the block branch (and modified the commit log to
say "raw-posix: ..." for patches 2 and 3)
Kevin
^ permalink raw reply [flat|nested] 6+ messages in thread