Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751761AbcDOOzr (ORCPT ); Fri, 15 Apr 2016 10:55:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46477 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751545AbcDOOzp (ORCPT ); Fri, 15 Apr 2016 10:55:45 -0400 From: Jeff Moyer To: Vishal Verma Cc: linux-nvdimm@ml01.01.org, Jens Axboe , Jan Kara , Andrew Morton , Christoph Hellwig , Dave Chinner , linux-kernel@vger.kernel.org, xfs@oss.sgi.com, linux-block@vger.kernel.org, linux-mm@kvack.org, Matthew Wilcox , linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, Al Viro Subject: Re: [PATCH v2 2/5] dax: fallback from pmd to pte on error References: <1459303190-20072-1-git-send-email-vishal.l.verma@intel.com> <1459303190-20072-3-git-send-email-vishal.l.verma@intel.com> 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: Fri, 15 Apr 2016 10:55:43 -0400 In-Reply-To: <1459303190-20072-3-git-send-email-vishal.l.verma@intel.com> (Vishal Verma's message of "Tue, 29 Mar 2016 19:59:47 -0600") 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.38]); Fri, 15 Apr 2016 14:55:45 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1030 Lines: 32 Vishal Verma writes: > From: Dan Williams > > In preparation for consulting a badblocks list in pmem_direct_access(), > teach dax_pmd_fault() to fallback rather than fail immediately upon > encountering an error. The thought being that reducing the span of the > dax request may avoid the error region. > > Signed-off-by: Dan Williams Reviewed-by: Jeff Moyer > --- > fs/dax.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/fs/dax.c b/fs/dax.c > index 90322eb..ec6417b 100644 > --- a/fs/dax.c > +++ b/fs/dax.c > @@ -945,8 +945,8 @@ int __dax_pmd_fault(struct vm_area_struct *vma, unsigned long address, > long length = dax_map_atomic(bdev, &dax); > > if (length < 0) { > - result = VM_FAULT_SIGBUS; > - goto out; > + dax_pmd_dbg(&bh, address, "dax-error fallback"); > + goto fallback; > } > if (length < PMD_SIZE) { > dax_pmd_dbg(&bh, address, "dax-length too small");