Re: Linux-only fdatasync() in 3c13bc
authorAustin Clements <amdragon@MIT.EDU>
Wed, 7 May 2014 17:18:36 +0000 (13:18 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 18:02:19 +0000 (10:02 -0800)
4f/1e60b6b098ea7241636b08ddb2f428725cf23d [new file with mode: 0644]

diff --git a/4f/1e60b6b098ea7241636b08ddb2f428725cf23d b/4f/1e60b6b098ea7241636b08ddb2f428725cf23d
new file mode 100644 (file)
index 0000000..d394254
--- /dev/null
@@ -0,0 +1,108 @@
+Return-Path: <amdragon@mit.edu>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 25B72431FAF\r
+       for <notmuch@notmuchmail.org>; Wed,  7 May 2014 10:18:52 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id xv-i6EeS37kj for <notmuch@notmuchmail.org>;\r
+       Wed,  7 May 2014 10:18:44 -0700 (PDT)\r
+Received: from dmz-mailsec-scanner-6.mit.edu (dmz-mailsec-scanner-6.mit.edu\r
+       [18.7.68.35])\r
+       (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 64C88431FAE\r
+       for <notmuch@notmuchmail.org>; Wed,  7 May 2014 10:18:44 -0700 (PDT)\r
+X-AuditID: 12074423-f79916d000000c54-3d-536a6af36e1e\r
+Received: from mailhub-auth-3.mit.edu ( [18.9.21.43])\r
+       (using TLS with cipher AES256-SHA (256/256 bits))\r
+       (Client did not present a certificate)\r
+       by dmz-mailsec-scanner-6.mit.edu (Symantec Messaging Gateway) with SMTP\r
+       id 6E.B1.03156.3FA6A635; Wed,  7 May 2014 13:18:43 -0400 (EDT)\r
+Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11])\r
+       by mailhub-auth-3.mit.edu (8.13.8/8.9.2) with ESMTP id s47HIevp000544; \r
+       Wed, 7 May 2014 13:18:41 -0400\r
+Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])\r
+       (authenticated bits=0)\r
+       (User authenticated as amdragon@ATHENA.MIT.EDU)\r
+       by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id s47HIbe3000314\r
+       (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT);\r
+       Wed, 7 May 2014 13:18:39 -0400\r
+Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.80)\r
+       (envelope-from <amdragon@mit.edu>)\r
+       id 1Wi5UL-0004by-BO; Wed, 07 May 2014 13:18:37 -0400\r
+Date: Wed, 7 May 2014 13:18:36 -0400\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: David Bremner <david@tethera.net>\r
+Subject: Re: Linux-only fdatasync() in 3c13bc\r
+Message-ID: <20140507171835.GA27619@mit.edu>\r
+References: <20140506195938.GA18213@coyotlan.Tlalpan>\r
+       <536a1723.0578e00a.601a.ffff976f@mx.google.com>\r
+       <m27g5x7o4w.fsf@guru.guru-group.fi>\r
+       <87vbthu3qx.fsf@maritornes.cs.unb.ca>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=utf-8\r
+Content-Disposition: inline\r
+Content-Transfer-Encoding: 8bit\r
+In-Reply-To: <87vbthu3qx.fsf@maritornes.cs.unb.ca>\r
+User-Agent: Mutt/1.5.21 (2010-09-15)\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFtrEKsWRmVeSWpSXmKPExsUixCmqrfs5KyvYYPFhaYsbrd2MFitm9rFZ\r
+       XL85k9nizcp5rA4sHjtn3WX3OPx1IYvHs1W3mD22HHrPHMASxWWTkpqTWZZapG+XwJWx+fZ8\r
+       loI9bBVLf05jbGCcydrFyMkhIWAisX/FRHYIW0ziwr31bF2MXBxCArOZJB7f+8kM4WxglNh+\r
+       8g4LhHOKSeLy6/2MEM4SRomGTbuZQPpZBFQkvv3dzQhiswloSGzbvxzMFhFQlbi6bTLYXGaB\r
+       JkaJ3cc3MoMkhAV0JV6v6QVr5hXQkdi15QrU1K2MEj8PfGaHSAhKnJz5hAXEZhZQl/gz7xJQ\r
+       MweQLS2x/B8HRFheonnrbLCZnAJGElv+HAYrFwU6aMrJbWwTGIVnIZk0C8mkWQiTZiGZtICR\r
+       ZRWjbEpulW5uYmZOcWqybnFyYl5eapGumV5uZoleakrpJkZQ1LC7KO9g/HNQ6RCjAAejEg9v\r
+       hnNWsBBrYllxZe4hRkkOJiVR3mnJQCG+pPyUyozE4oz4otKc1OJDjBIczEoivG4ZQDnelMTK\r
+       qtSifJiUNAeLkjjvW2urYCGB9MSS1OzU1ILUIpisDAeHkgTv4UygRsGi1PTUirTMnBKENBMH\r
+       J8hwHpDhIDW8xQWJucWZ6RD5U4yKUkCjQbYKgCQySvPgemFJ7RWjONArwrwLQKp4gAkRrvsV\r
+       0GAmoMFcxukgg0sSEVJSDYxnlJsqWX6JuZwMTYie/H2C/81HzHYGjLPPit1hC+U6JrB3ndSP\r
+       cCWZmxZ2uzj3+po/PX3hidepeCOuf+Jvy/Le+FgaM0/XFo/lKCjYNN3uu8WcBd4Vx/bJNV88\r
+       Pt19ueTXjhSb4t3e2evFrN5pnTlevO59UdXBg/oyLx/v25x8Pyet4Jd88l4lluKMREMt5qLi\r
+       RAA+mSVdRQMAAA==\r
+Cc: Tomi Ollila <tomi.ollila@iki.fi>, notmuch@notmuchmail.org\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Wed, 07 May 2014 17:18:52 -0000\r
+\r
+Quoth David Bremner on May 07 at 10:17 pm:\r
+> Tomi Ollila <tomi.ollila@iki.fi> writes:\r
+> \r
+> > On Wed, May 07 2014, Kushal Kumaran <kushal.kumaran+notmuch@gmail.com> wrote:\r
+> >\r
+> >> Xīcò <xico@atelo.org> writes:\r
+> >>\r
+> >>> Also, commit 3c13bc introduced a call to fdatasync() which is not\r
+> >>> available on FreeBSD, and probably not either on MacOS at least.\r
+> >>>\r
+> >>\r
+> >> fdatasync is POSIX:\r
+> >> http://pubs.opengroup.org/onlinepubs/009695399/functions/fdatasync.html\r
+> >\r
+> > No wonder it is problematic, then >;)\r
+> >\r
+> \r
+> I seem to recall Austin saying on IRC that this usage was guaranteed to\r
+> call fsync anyway. Comments Austin?\r
+\r
+Yes, since the size of the file will have definitely changed, the\r
+metadata will have to be flushed anyway, so using fdatasync here has\r
+no advantage over using fsync.\r