Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id D4AE2431FBF for ; Thu, 8 May 2014 08:36:40 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FeaAFMbtrAkZ for ; Thu, 8 May 2014 08:36:36 -0700 (PDT) Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) by olra.theworths.org (Postfix) with ESMTP id 8E528431FAE for ; Thu, 8 May 2014 08:36:36 -0700 (PDT) Received: from guru.guru-group.fi (localhost [IPv6:::1]) by guru.guru-group.fi (Postfix) with ESMTP id 1683F1000E5; Thu, 8 May 2014 18:36:29 +0300 (EEST) From: Tomi Ollila To: David Bremner , notmuch@notmuchmail.org Subject: Re: [PATCH] notmuch-dump: use fsync instead of fdatasync In-Reply-To: <1399550227-18488-1-git-send-email-david@tethera.net> References: <20140507171835.GA27619@mit.edu> <1399550227-18488-1-git-send-email-david@tethera.net> User-Agent: Notmuch/0.18+11~gbc95cc5 (http://notmuchmail.org) Emacs/24.3.1 (x86_64-unknown-linux-gnu) X-Face: HhBM'cA~ MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2014 15:36:41 -0000 On Thu, May 08 2014, David Bremner wrote: > Since the file size will have changed, there is no performance benefit > to calling fdatasync. Somewhat surprisingly, using fdatasync > apparently causes portability problems on FreeBSD. > --- Well, this is easy to review! LGTM. Tomi > notmuch-dump.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/notmuch-dump.c b/notmuch-dump.c > index 2849eab..887a208 100644 > --- a/notmuch-dump.c > +++ b/notmuch-dump.c > @@ -169,7 +169,7 @@ notmuch_database_dump (notmuch_database_t *notmuch, > } > > if (output_file_name) { > - ret = fdatasync (outfd); > + ret = fsync (outfd); > if (ret) { > fprintf (stderr, "Error syncing %s to disk: %s\n", > name_for_error, strerror (errno)); > -- > 1.9.2