From patchwork Tue May 10 18:49:12 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Verma, Vishal L" X-Patchwork-Id: 9061141 Return-Path: X-Original-To: patchwork-linux-block@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id DEDBA9F1D3 for ; Tue, 10 May 2016 18:53:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2D59120165 for ; Tue, 10 May 2016 18:53:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3501C20173 for ; Tue, 10 May 2016 18:53:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752285AbcEJSti (ORCPT ); Tue, 10 May 2016 14:49:38 -0400 Received: from mga09.intel.com ([134.134.136.24]:46394 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752239AbcEJSth (ORCPT ); Tue, 10 May 2016 14:49:37 -0400 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 10 May 2016 11:49:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,605,1455004800"; d="scan'208";a="950330829" Received: from omniknight.lm.intel.com ([10.232.112.171]) by orsmga001.jf.intel.com with ESMTP; 10 May 2016 11:49:35 -0700 From: Vishal Verma 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, Ross Zwisler , Dave Chinner , Jan Kara , Jens Axboe , Andrew Morton , linux-kernel@vger.kernel.org, Christoph Hellwig , Jeff Moyer , Boaz Harrosh Subject: [PATCH v6 1/5] dax: fallback from pmd to pte on error Date: Tue, 10 May 2016 12:49:12 -0600 Message-Id: <1462906156-22303-2-git-send-email-vishal.l.verma@intel.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1462906156-22303-1-git-send-email-vishal.l.verma@intel.com> References: <1462906156-22303-1-git-send-email-vishal.l.verma@intel.com> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Spam-Status: No, score=-9.0 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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. Reviewed-by: Jeff Moyer Reviewed-by: Christoph Hellwig Reviewed-by: Jan Kara 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");