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