From patchwork Fri Sep 21 14:08:17 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juan Quintela X-Patchwork-Id: 185777 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 642FA2C0080 for ; Sat, 22 Sep 2012 01:13:32 +1000 (EST) Received: from localhost ([::1]:48839 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TF4v4-0001OA-Ai for incoming@patchwork.ozlabs.org; Fri, 21 Sep 2012 11:13:30 -0400 Received: from eggs.gnu.org ([208.118.235.92]:41396) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TF3uX-0002Mo-OX for qemu-devel@nongnu.org; Fri, 21 Sep 2012 10:08:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TF3uR-0007O5-UN for qemu-devel@nongnu.org; Fri, 21 Sep 2012 10:08:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:20564) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TF3uR-0007Nv-MH for qemu-devel@nongnu.org; Fri, 21 Sep 2012 10:08:47 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q8LE8k62030043 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 21 Sep 2012 10:08:47 -0400 Received: from trasno.mitica (ovpn-116-55.ams2.redhat.com [10.36.116.55]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q8LE8LUs020823; Fri, 21 Sep 2012 10:08:45 -0400 From: Juan Quintela To: qemu-devel@nongnu.org Date: Fri, 21 Sep 2012 16:08:17 +0200 Message-Id: <1348236500-2565-12-git-send-email-quintela@redhat.com> In-Reply-To: <1348236500-2565-1-git-send-email-quintela@redhat.com> References: <1348236500-2565-1-git-send-email-quintela@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 11/14] buffered_file: don't flush on put buffer X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 Reviewed-by: Paolo Bonzini --- buffered_file.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/buffered_file.c b/buffered_file.c index f4a788d..929b911 100644 --- a/buffered_file.c +++ b/buffered_file.c @@ -107,12 +107,6 @@ static int buffered_put_buffer(void *opaque, const uint8_t *buf, int64_t pos, in buffered_append(s, buf, size); } - error = buffered_flush(s); - if (error < 0) { - DPRINTF("buffered flush error. bailing: %s\n", strerror(-error)); - return error; - } - return size; }