Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932851AbcDYPcO (ORCPT ); Mon, 25 Apr 2016 11:32:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41689 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754773AbcDYPcM (ORCPT ); Mon, 25 Apr 2016 11:32:12 -0400 From: Jeff Moyer To: "hch\@infradead.org" Cc: "Verma\, Vishal L" , "axboe\@fb.com" , "jack\@suse.cz" , "linux-nvdimm\@ml01.01.org" , "david\@fromorbit.com" , "linux-kernel\@vger.kernel.org" , "xfs\@oss.sgi.com" , "linux-block\@vger.kernel.org" , "linux-mm\@kvack.org" , "Wilcox\, Matthew R" , "linux-fsdevel\@vger.kernel.org" , "akpm\@linux-foundation.org" , "linux-ext4\@vger.kernel.org" , "viro\@zeniv.linux.org.uk" Subject: Re: [PATCH v2 5/5] dax: handle media errors in dax_do_io 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> X-PGP-KeyID: 1F78E1B4 X-PGP-CertKey: F6FE 280D 8293 F72C 65FD 5A58 1FF8 A7CA 1F78 E1B4 X-PCLoadLetter: What the f**k does that mean? Date: Mon, 25 Apr 2016 11:32:08 -0400 In-Reply-To: <20160425083114.GA27556@infradead.org> (hch@infradead.org's message of "Mon, 25 Apr 2016 01:31:14 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Mon, 25 Apr 2016 15:32:11 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 882 Lines: 21 "hch@infradead.org" writes: > On Sat, Apr 23, 2016 at 06:08:37PM +0000, Verma, Vishal L wrote: >> direct_IO might fail with -EINVAL due to misalignment, or -ENOMEM due >> to some allocation failing, and I thought we should return the original >> -EIO in such cases so that the application doesn't lose the information >> that the bad block is actually causing the error. > > EINVAL is a concern here. Not due to the right error reported, but > because it means your current scheme is fundamentally broken - we > need to support I/O at any alignment for DAX I/O, and not fail due to > alignbment concernes for a highly specific degraded case. > > I think this whole series need to go back to the drawing board as I > don't think it can actually rely on using direct I/O as the EIO > fallback. The only callers of dax_do_io are direct_IO methods. Cheers, Jeff