From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from www.llwyncelyn.cymru ([82.70.14.225]:52676 "EHLO fuzix.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726410AbeI0AZQ (ORCPT ); Wed, 26 Sep 2018 20:25:16 -0400 Date: Wed, 26 Sep 2018 19:10:55 +0100 From: Alan Cox To: "Theodore Y. Ts'o" Cc: Jeff Layton , =?UTF-8?B?54Sm5pmT5Yas?= , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Rogier Wolff Subject: Re: POSIX violation by writeback error Message-ID: <20180926191055.6fc1514f@alans-desktop> In-Reply-To: <20180925223054.GH2933@thunk.org> References: <486f6105fd4076c1af67dae7fdfe6826019f7ff4.camel@redhat.com> <20180925003044.239531c7@alans-desktop> <0662a4c5d2e164d651a6a116d06da380f317100f.camel@redhat.com> <20180925154627.GC2933@thunk.org> <23cd68a665d27216415dc79367ffc3bee1b60b86.camel@redhat.com> <20180925223054.GH2933@thunk.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-fsdevel-owner@vger.kernel.org List-ID: > And I think that's fine. The only way we can make any guarantees is > if we do what Alan suggested, which is to imply that a read on a dirty > page *block* until the the page is successfully written back. This > would destroy performance. In almost all cases you don't care so you wouldn't use it. In those cases where it might matter it's almost always the case that a reader won't consume it before it hits the media. That's why I suggested having an fbarrier() so you can explicitly say 'in the even that case does happen then stall and write it'. It's kind of lazy fsync. That can be used with almost no cost by things like mail daemons. Another way given that this only really makes sense with locks is to add that fbarrier notion as a file locking optional semantic so you can 'unlock with barrier' and 'lock with barrier honoured' Alan