From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f51.google.com (mail-pa0-f51.google.com [209.85.220.51]) by kanga.kvack.org (Postfix) with ESMTP id C18266B0253 for ; Thu, 24 Mar 2016 19:17:57 -0400 (EDT) Received: by mail-pa0-f51.google.com with SMTP id fe3so33293033pab.1 for ; Thu, 24 Mar 2016 16:17:57 -0700 (PDT) Received: from mga02.intel.com (mga02.intel.com. [134.134.136.20]) by mx.google.com with ESMTP id tb4si295141pab.121.2016.03.24.16.17.57 for ; Thu, 24 Mar 2016 16:17:57 -0700 (PDT) From: Vishal Verma Subject: [PATCH 2/5] dax: fallback from pmd to pte on error Date: Thu, 24 Mar 2016 17:17:27 -0600 Message-Id: <1458861450-17705-3-git-send-email-vishal.l.verma@intel.com> In-Reply-To: <1458861450-17705-1-git-send-email-vishal.l.verma@intel.com> References: <1458861450-17705-1-git-send-email-vishal.l.verma@intel.com> Sender: owner-linux-mm@kvack.org List-ID: To: linux-nvdimm@lists.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 From: Dan Williams 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 bbb2ad7..bb7e9f8 100644 --- a/fs/dax.c +++ b/fs/dax.c @@ -940,8 +940,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 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org