Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752775AbcDZIdh (ORCPT ); Tue, 26 Apr 2016 04:33:37 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:46290 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752344AbcDZIdf (ORCPT ); Tue, 26 Apr 2016 04:33:35 -0400 Date: Tue, 26 Apr 2016 01:33:32 -0700 From: "hch@infradead.org" To: "Verma, Vishal L" Cc: "hch@infradead.org" , "Wilcox, Matthew R" , "linux-kernel@vger.kernel.org" , "linux-block@vger.kernel.org" , "xfs@oss.sgi.com" , "linux-nvdimm@ml01.01.org" , "jmoyer@redhat.com" , "linux-mm@kvack.org" , "viro@zeniv.linux.org.uk" , "axboe@fb.com" , "akpm@linux-foundation.org" , "linux-fsdevel@vger.kernel.org" , "linux-ext4@vger.kernel.org" , "david@fromorbit.com" , "jack@suse.cz" Subject: Re: [PATCH v2 5/5] dax: handle media errors in dax_do_io Message-ID: <20160426083332.GB364@infradead.org> References: <1459303190-20072-1-git-send-email-vishal.l.verma@intel.com> <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1461604476.3106.12.camel@intel.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 819 Lines: 21 On Mon, Apr 25, 2016 at 05:14:36PM +0000, Verma, Vishal L wrote: > - Application hits EIO doing dax_IO or load/store io > > - It checks badblocks and discovers it's files have lost data > > - It write()s those sectors (possibly converted to file offsets using > fiemap) > ?? ?? * This triggers the fallback path, but if the application is doing > this level of recovery, it will know the sector is bad, and write the > entire sector This sounds like a mess. > I think if we want to keep allowing arbitrary alignments for the > dax_do_io path, we'd need: > 1. To represent badblocks at a finer granularity (likely cache lines) > 2. To allow the driver to do IO to a *block device* at sub-sector > granularity It's not a block device if it supports DAX. It's byte addressable memory masquerading as a block device.