Patchwork [26/27] buffered_file: don't flush on put buffer

login
register
mail settings
Submitter Juan Quintela
Date July 24, 2012, 6:36 p.m.
Message ID <1343155012-26316-27-git-send-email-quintela@redhat.com>
Download mbox | patch
Permalink /patch/173034/
State New
Headers show

Comments

Juan Quintela - July 24, 2012, 6:36 p.m.
We call buffered_put_buffer with iothread held, and buffered_flush() does
synchronous writes.  We only want to do the synchronous writes outside.

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 buffered_file.c |    2 --
 1 file changed, 2 deletions(-)

Patch

diff --git a/buffered_file.c b/buffered_file.c
index ac2327b..d3bed86 100644
--- a/buffered_file.c
+++ b/buffered_file.c
@@ -110,8 +110,6 @@  static int buffered_put_buffer(void *opaque, const uint8_t *buf, int64_t pos, in
         buffered_append(s, buf, size);
     }

-    buffered_flush(s);
-
     return size;
 }