From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932305AbcEBXRv (ORCPT ); Mon, 2 May 2016 19:17:51 -0400 Received: from mga01.intel.com ([192.55.52.88]:51863 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755258AbcEBXRs (ORCPT ); Mon, 2 May 2016 19:17:48 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,569,1455004800"; d="scan'208";a="944767160" From: "Verma, Vishal L" To: "david@fromorbit.com" , "jmoyer@redhat.com" CC: "linux-kernel@vger.kernel.org" , "linux-block@vger.kernel.org" , "hch@infradead.org" , "xfs@oss.sgi.com" , "linux-nvdimm@ml01.01.org" , "linux-mm@kvack.org" , "viro@zeniv.linux.org.uk" , "Williams, Dan J" , "axboe@fb.com" , "akpm@linux-foundation.org" , "linux-fsdevel@vger.kernel.org" , "linux-ext4@vger.kernel.org" , "Wilcox, Matthew R" , "jack@suse.cz" Subject: Re: [PATCH v2 5/5] dax: handle media errors in dax_do_io Thread-Topic: [PATCH v2 5/5] dax: handle media errors in dax_do_io Thread-Index: AQHRlzGOmdVyB28MyEyyQ/rUxU8Y+Z+T1f2AgASHRwCAAoNZAIAAkjsAgABnuwCAAAeVgIAADaqAgAntpViAAPdsAIAAA5KA Date: Mon, 2 May 2016 23:17:21 +0000 Message-ID: <1462231029.1421.82.camel@intel.com> References: <1459303190-20072-6-git-send-email-vishal.l.verma@intel.com> <20160420205923.GA24797@infradead.org> <1461434916.3695.7.camel@intel.com> <20160425083114.GA27556@infradead.org> <1461604476.3106.12.camel@intel.com> <20160425232552.GD18496@dastard> <1461628381.1421.24.camel@intel.com> <20160426004155.GF18496@dastard> <20160502230422.GQ26977@dastard> In-Reply-To: <20160502230422.GQ26977@dastard> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.232.112.171] Content-Type: text/plain; charset="utf-8" Content-ID: MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id u42NHtYZ019570 On Tue, 2016-05-03 at 09:04 +1000, Dave Chinner wrote: > On Mon, May 02, 2016 at 11:18:36AM -0400, Jeff Moyer wrote: > > > > Dave Chinner writes: > > > > > > > > On Mon, Apr 25, 2016 at 11:53:13PM +0000, Verma, Vishal L wrote: > > > > > > > > On Tue, 2016-04-26 at 09:25 +1000, Dave Chinner wrote: > > > You're assuming that only the DAX aware application accesses it's > > > files.  users, backup programs, data replicators, fileystem > > > re-organisers (e.g.  defragmenters) etc all may access the files > > > and > > > they may throw errors. What then? > > I'm not sure how this is any different from regular storage.  If an > > application gets EIO, it's up to the app to decide what to do with > > that. > Sure - they'll fail. But the question I'm asking is that if the > application that owns the data is supposed to do error recovery, > what happens when a 3rd party application hits an error? If that > consumes the error, the the app that owns the data won't ever get a > chance to correct the error. > > This is a minefield - a 3rd party app that swallows and clears DAX > based IO errors is a data corruption vector. can yo imagine if > *grep* did this? The model that is being promoted here effectively > allows this sort of behaviour - I don't really think we > should be architecting an error recovery strategy that has the > capability to go this wrong.... > Just to address this bit - No. Any number of backup/3rd party application can hit the error and _fail_ but surely they won't try to _write_ the bad location? Only a write to the bad sector will clear it in this model - and until such time, all reads will just keep erroring out. This works for DAX/mmap based reads/writes too - mmap-stores won't/can't clear errors - you have to go through the block path, and in the altest version of my patch set, that has to be explicitly through O_DIRECT.