From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 789D0C43381 for ; Wed, 20 Mar 2019 15:39:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 482762146E for ; Wed, 20 Mar 2019 15:39:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553096360; bh=sjiEHosHlODEYLxwdSErEsIiF5ci9oQC3zLiS1uR4LI=; h=Subject:To:Cc:From:Date:List-ID:From; b=BeK+Ns7+wggpx0lRDTkgg1mG3KsvwEe202YcEVAYgBKZDolw0jD2UCFcfgIKpKoIC hjUQyff0odxHlWhwqhBmeTFxEXJbi+OFZ9k7iExwZU+xP8lkJ2Y//BMBvsFjRjJNqP UNbKRSZZgNHkPcOzqFt21PLtuSuCDaM26Brio73M= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726403AbfCTPjT (ORCPT ); Wed, 20 Mar 2019 11:39:19 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:47327 "EHLO out5-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725988AbfCTPjT (ORCPT ); Wed, 20 Mar 2019 11:39:19 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 0E573228FA; Wed, 20 Mar 2019 11:39:18 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Wed, 20 Mar 2019 11:39:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=wAP/wx ahi2QmqeJrcnrzSp+qFdZunezhbgwaO5v8Lmg=; b=l7t2HNae+CKe0YwfJbb2+u Rw63NCAj+r8emZqzfhZiRDhvlkDuNw5exuvJWPIf95CpE3AYTMg4EYsXjKQl2aH6 Z7TdiHppe+eGe5Cv4FdHsZjJeKlE3gKDNkdR+FZAc3a4t/qOjm1BmEU+zBmHKLyT 5/ncJPmC2CmCoY1Tk+HUCstFD5j6hrM5iyHdYwkGXjpizgzd2fzbA9Z46BcRdMUj S32q335UEV+KnQtFN3xgbTBE2X2yxHCC9k8jrleWVv4UKnn8JSphUCHmXrOHXIqh E/3lj3S1eG6DWryhgU96rLLo01lpmLIo4l4wELvulX0JgHzDHpNVCHIKqiRpnrkw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddrieeigdejlecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepuffvhfffkfggtgfgsehtkeertddttd flnecuhfhrohhmpeeoghhrvghgkhhhsehlihhnuhigfhhouhhnuggrthhiohhnrdhorhhg qeenucfkphepkeefrdekiedrkeelrddutdejnecurfgrrhgrmhepmhgrihhlfhhrohhmpe hgrhgvgheskhhrohgrhhdrtghomhenucevlhhushhtvghrufhiiigvpeeh X-ME-Proxy: Received: from localhost (5356596b.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) by mail.messagingengine.com (Postfix) with ESMTPA id 6A203102D0; Wed, 20 Mar 2019 11:39:17 -0400 (EDT) Subject: FAILED: patch "[PATCH] libnvdimm/pmem: Honor force_raw for legacy pmem regions" failed to apply to 4.4-stable tree To: dan.j.williams@intel.com, stable@vger.kernel.org Cc: From: Date: Wed, 20 Mar 2019 16:39:15 +0100 Message-ID: <155309635524812@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org The patch below does not apply to the 4.4-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From fa7d2e639cd90442d868dfc6ca1d4cc9d8bf206e Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Thu, 24 Jan 2019 17:33:06 -0800 Subject: [PATCH] libnvdimm/pmem: Honor force_raw for legacy pmem regions For recovery, where non-dax access is needed to a given physical address range, and testing, allow the 'force_raw' attribute to override the default establishment of a dev_pagemap. Otherwise without this capability it is possible to end up with a namespace that can not be activated due to corrupted info-block, and one that can not be repaired due to a section collision. Cc: Fixes: 004f1afbe199 ("libnvdimm, pmem: direct map legacy pmem by default") Signed-off-by: Dan Williams diff --git a/drivers/nvdimm/namespace_devs.c b/drivers/nvdimm/namespace_devs.c index 4b077555ac70..33a3b23b3db7 100644 --- a/drivers/nvdimm/namespace_devs.c +++ b/drivers/nvdimm/namespace_devs.c @@ -138,6 +138,7 @@ bool nd_is_uuid_unique(struct device *dev, u8 *uuid) bool pmem_should_map_pages(struct device *dev) { struct nd_region *nd_region = to_nd_region(dev->parent); + struct nd_namespace_common *ndns = to_ndns(dev); struct nd_namespace_io *nsio; if (!IS_ENABLED(CONFIG_ZONE_DEVICE)) @@ -149,6 +150,9 @@ bool pmem_should_map_pages(struct device *dev) if (is_nd_pfn(dev) || is_nd_btt(dev)) return false; + if (ndns->force_raw) + return false; + nsio = to_nd_namespace_io(dev); if (region_intersects(nsio->res.start, resource_size(&nsio->res), IORESOURCE_SYSTEM_RAM,