Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3123075imm; Mon, 24 Sep 2018 16:31:11 -0700 (PDT) X-Google-Smtp-Source: ACcGV60t2gpo+HY5lLASUceeMbMdo4tWJhCEh85rfNbZSTyH6QbITKNDVfoMNz4MPg9CYak2zqCm X-Received: by 2002:a62:6b85:: with SMTP id g127-v6mr889769pfc.204.1537831871508; Mon, 24 Sep 2018 16:31:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537831871; cv=none; d=google.com; s=arc-20160816; b=ZH9/Y8/jm4pfghoUXE5rG2DeF/Pi8r8tc0aC6W+HFFUmB5HyudxSJ0EgLvxlfaiI/8 O7GNE7iwn9a99jl1hasU61HQ5Ts24MIvPeryTOn6z1ac6jgQNK+XiTaZfIF9KBFhNG59 HRa7X4PHyap5MDhZSCseCC6ZQcEy0sMX3N027ior2g2KgPIvu4KYkRdyjsa3QPp9a6rN +ClPkZc8Gkoj7WLLSl9+8xSHlrhojURkMQQbIA2ieSDUnmpc4SULm8xosujB751PzpRS CDmrX3uWulpT5YgHLKXhUay1i8/9+obgRHbOL0GQO4fQPfA0czb9ONcEvpldpb9FRQWE MOJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=s44EL/5bS7e/djUip/ne5K/fFR/yFpab8vx37wzg4tg=; b=hDKgt1RC3a6EoQ6MLgam7hW4DznEOXT9tPcRvhEqI15R2SYAQQQ7V9vjbBAitLcYuv 969lrLHw2Rl8/gzi5SpSAMmlPxN1SHRv4daO51WMxLc7TBhOca/Cx9Oe+ZW2ktvqDAZK ahIdPmHW2wcML2R8CQ5XWssxSlJrVfWyIgoMNTmc51pFMwYwi7uGlCs928K8qIy3rlw+ abHrdcHSQkOKlYWP7D4rCxpFGFFq0szMEL09jeBhY4DGf2t8fYFPzO26oVTIzA1gQGML +1nngturKqjUMicx2Sj6Gbnj9N+8TuxyLxPDq/P/UuncnwN6bLFiBWaUE9KvDGrneJFF IivA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m14-v6si633116pgc.368.2018.09.24.16.30.53; Mon, 24 Sep 2018 16:31:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727234AbeIYFf1 (ORCPT + 99 others); Tue, 25 Sep 2018 01:35:27 -0400 Received: from www.llwyncelyn.cymru ([82.70.14.225]:41116 "EHLO fuzix.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725843AbeIYFf0 (ORCPT ); Tue, 25 Sep 2018 01:35:26 -0400 Received: from alans-desktop (82-70-14-226.dsl.in-addr.zen.co.uk [82.70.14.226]) by fuzix.org (8.15.2/8.15.2) with ESMTP id w8ONUiac018122; Tue, 25 Sep 2018 00:30:45 +0100 Date: Tue, 25 Sep 2018 00:30:44 +0100 From: Alan Cox To: Jeff Layton Cc: =?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: <20180925003044.239531c7@alans-desktop> In-Reply-To: <486f6105fd4076c1af67dae7fdfe6826019f7ff4.camel@redhat.com> References: <486f6105fd4076c1af67dae7fdfe6826019f7ff4.camel@redhat.com> Organization: Intel Corporation X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > write() > kernel attempts to write back page and fails > page is marked clean and evicted from the cache > read() > > Now your write is gone and there were no calls between the write and > read. > > The question we still need to answer is this: > > When we attempt to write back some data from the cache and that fails, > what should happen to the dirty pages? Why do you care about the content of the pages at that point. The only options are to use the data (todays model), or to report that you are on fire. If you are going to error you don't need to use the data so you could in fact compress dramatically the amount of stuff you need to save somewhere. You need the page information so you can realize what page this is, but you can point the data into oblivion somewhere because you are no longer going to give it to anyone (assuming you can successfully force unmap it from everyone once it's not locked by a DMA or similar). In the real world though it's fairly unusual to just lose a bit of I/O. Flash devices in particular have a nasty tendancy to simply go *poof* and the first you know about an I/O error is the last data the drive ever gives you short of jtag. NFS is an exception and NFS soft timeouts are nasty. Alan