1 Return-Path: <bremner@tesseract.cs.unb.ca>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id DEA48431FBF
\r
6 for <notmuch@notmuchmail.org>; Thu, 8 May 2014 04:58:20 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id bg+ivVVaCJJY for <notmuch@notmuchmail.org>;
\r
16 Thu, 8 May 2014 04:58:16 -0700 (PDT)
\r
17 Received: from mx.xen14.node3324.gplhost.com (gitolite.debian.net
\r
18 [87.98.215.224]) (using TLSv1 with cipher AES256-SHA (256/256 bits))
\r
19 (No client certificate requested)
\r
20 by olra.theworths.org (Postfix) with ESMTPS id 0D020431FAE
\r
21 for <notmuch@notmuchmail.org>; Thu, 8 May 2014 04:58:16 -0700 (PDT)
\r
22 Received: from remotemail by mx.xen14.node3324.gplhost.com with local (Exim
\r
23 4.72) (envelope-from <bremner@tesseract.cs.unb.ca>)
\r
24 id 1WiMx8-00070g-CL; Thu, 08 May 2014 11:57:30 +0000
\r
25 Received: (nullmailer pid 18544 invoked by uid 1000); Thu, 08 May 2014
\r
27 From: David Bremner <david@tethera.net>
\r
28 To: notmuch@notmuchmail.org
\r
29 Subject: [PATCH] notmuch-dump: use fsync instead of fdatasync
\r
30 Date: Thu, 8 May 2014 20:57:07 +0900
\r
31 Message-Id: <1399550227-18488-1-git-send-email-david@tethera.net>
\r
32 X-Mailer: git-send-email 1.9.2
\r
33 In-Reply-To: <20140507171835.GA27619@mit.edu>
\r
34 References: <20140507171835.GA27619@mit.edu>
\r
35 X-BeenThere: notmuch@notmuchmail.org
\r
36 X-Mailman-Version: 2.1.13
\r
38 List-Id: "Use and development of the notmuch mail system."
\r
39 <notmuch.notmuchmail.org>
\r
40 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
41 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
42 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
43 List-Post: <mailto:notmuch@notmuchmail.org>
\r
44 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
45 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
46 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
47 X-List-Received-Date: Thu, 08 May 2014 11:58:21 -0000
\r
49 Since the file size will have changed, there is no performance benefit
\r
50 to calling fdatasync. Somewhat surprisingly, using fdatasync
\r
51 apparently causes portability problems on FreeBSD.
\r
53 notmuch-dump.c | 2 +-
\r
54 1 file changed, 1 insertion(+), 1 deletion(-)
\r
56 diff --git a/notmuch-dump.c b/notmuch-dump.c
\r
57 index 2849eab..887a208 100644
\r
58 --- a/notmuch-dump.c
\r
59 +++ b/notmuch-dump.c
\r
60 @@ -169,7 +169,7 @@ notmuch_database_dump (notmuch_database_t *notmuch,
\r
63 if (output_file_name) {
\r
64 - ret = fdatasync (outfd);
\r
65 + ret = fsync (outfd);
\r
67 fprintf (stderr, "Error syncing %s to disk: %s\n",
\r
68 name_for_error, strerror (errno));
\r