Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752300AbcDWTOG (ORCPT ); Sat, 23 Apr 2016 15:14:06 -0400 Received: from mga02.intel.com ([134.134.136.20]:11035 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751742AbcDWTOB (ORCPT ); Sat, 23 Apr 2016 15:14:01 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,523,1455004800"; d="scan'208";a="965085686" From: Vishal Verma To: linux-nvdimm@ml01.01.org Cc: Dan Williams , linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, xfs@oss.sgi.com, linux-ext4@vger.kernel.org, linux-mm@kvack.org, Matthew Wilcox , Ross Zwisler , Dave Chinner , Jan Kara , Jens Axboe , Al Viro , Andrew Morton , linux-kernel@vger.kernel.org, Christoph Hellwig , Jeff Moyer , "Kirill A. Shutemov" Subject: [PATCH v3 2/7] dax: fallback from pmd to pte on error Date: Sat, 23 Apr 2016 13:13:37 -0600 Message-Id: <1461438822-3592-3-git-send-email-vishal.l.verma@intel.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1461438822-3592-1-git-send-email-vishal.l.verma@intel.com> References: <1461438822-3592-1-git-send-email-vishal.l.verma@intel.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 896 Lines: 29 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 --- fs/dax.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/dax.c b/fs/dax.c index 5a34f08..52f0044 100644 --- a/fs/dax.c +++ b/fs/dax.c @@ -1111,8 +1111,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"); -- 2.5.5