From mboxrd@z Thu Jan 1 00:00:00 1970 From: tytso@mit.edu Subject: Re: fsync and journal_async_commit mount options Date: Tue, 18 Aug 2015 16:25:04 +0000 Message-ID: <20150818162503.GA8806@thunk.org> References: <20150816122454.GB3825@thunk.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "linux-fsdevel@vger.kernel.org" , "alexey.skidanov@gmail.com" To: Alexey Skidanov Return-path: Received: from imap.thunk.org ([74.207.234.97]:35944 "EHLO imap.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750942AbbHRQZF (ORCPT ); Tue, 18 Aug 2015 12:25:05 -0400 Content-Disposition: inline In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Tue, Aug 18, 2015 at 09:59:58AM +0000, Alexey Skidanov wrote: > > My question is regarding the barrier=0/1 mount option. On the one > hand, the "mount" man page says "This enables/disables the use of > write barriers in the jbd code". From there I understand that this > option changes the behaviour of journalling code only. But on the > other hand, this option change the the behaviour of fsync() (at > least in case of ext4): the flush request is issued only if barrier > mount option is 1. The bug is in the mount man page. It may have been true for ext3 oh, a decade or more ago when we didn't have an optimized fdatasync(2) implementation. (Ext4 may have predated Linux *having* fdatasync(2) support.) But no one has bothered to update documentation, because all of the people who care knew what it meant, and most users don't bother changing the defaults. Cheers, - Ted