Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp5666910imm; Tue, 26 Jun 2018 15:45:05 -0700 (PDT) X-Google-Smtp-Source: ADUXVKL+pE2kz4XzIK3DFddXgTv2VKmukffHuXJiT2YVKrbQHv9mbjNBkm5OJ/m0fV+eBzyCiju3 X-Received: by 2002:a17:902:710a:: with SMTP id a10-v6mr3548286pll.28.1530053105226; Tue, 26 Jun 2018 15:45:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530053105; cv=none; d=google.com; s=arc-20160816; b=rzF7AasTKoP0zfOD45CVV8/bvN0xGl5M/ro2uCcTnJOLvQSxOGMggV3yJs3wIVKC9d insOrjygsSOEgXSWTm6gdHIPKW+8bIgl2gyXx7gizr5Ipgnz+KfsLyiCkCOX8o4mb9yz w6ZBDYDJwnInMgO8FCuM+EXnqAcKX/pgXDInZVu7fjF88kJUIYmzAUqoJnkSPlsKPwfT 7lNMbxU1AxQtk0aKX/fg+Y928EskXfDphzRizri/vSVgqqQRINriqIPHl84NGXfsGg1k RwXa+c7YO/N9a+kwpEecJn4yk4Nw/paJ3snItarHEP6GWW922WJi7JnCOFFrTe1bEfYH lDVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=iUZxDyXTa7l+Y69UaIVu249abg7pbmpdaO7jw7T5zHg=; b=xkmZX1uPfGIL3a14WHUGTuuMN8z1jaVCdlgWf6Nyyop23Fqw23Tj6v9G2JAaQ/S1Ru +NIbrrsSPF0nP54GKoWzABSBz2e6Pabi5C0N7hQmhfVSN+SGJNtbjceHmusDQCiGm9PF ygEG0CSOUAA/oSujjyYaSrBCXopXy4/ZaOgCknDuVwoN+UAxYQ/n26ABqkcUU0/rzHI8 KEMRQOvvRmIP95CRO0qQkqMegnD2gDVgq/LDn38E7GRMoRHiXoS7V4whxIwNV3xsyfcb DOUTSdf1KBfgPCaK3+BLqepUqkOOQKirapIbmS3yLfFJhVsiRLUDSLzcnDhTKOgZGLZf 4F9A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v75-v6si2543763pfd.71.2018.06.26.15.44.49; Tue, 26 Jun 2018 15:45:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754864AbeFZR7i (ORCPT + 99 others); Tue, 26 Jun 2018 13:59:38 -0400 Received: from mga07.intel.com ([134.134.136.100]:23715 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754807AbeFZR7g (ORCPT ); Tue, 26 Jun 2018 13:59:36 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Jun 2018 10:59:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,275,1526367600"; d="scan'208";a="50086620" Received: from theros.lm.intel.com ([10.232.112.164]) by fmsmga007.fm.intel.com with ESMTP; 26 Jun 2018 10:59:34 -0700 From: Ross Zwisler To: Toshi Kani , Mike Snitzer , dm-devel@redhat.com Cc: Ross Zwisler , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nvdimm@lists.01.org, linux-xfs@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH v3 1/3] pmem: only set QUEUE_FLAG_DAX for fsdax mode Date: Tue, 26 Jun 2018 11:59:30 -0600 Message-Id: <20180626175932.8899-2-ross.zwisler@linux.intel.com> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180626175932.8899-1-ross.zwisler@linux.intel.com> References: <20180626175932.8899-1-ross.zwisler@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org QUEUE_FLAG_DAX is an indication that a given block device supports filesystem DAX and should not be set for PMEM namespaces which are in "raw" or "sector" modes. These namespaces lack struct page and are prevented from participating in filesystem DAX. Signed-off-by: Ross Zwisler Suggested-by: Mike Snitzer Cc: stable@vger.kernel.org --- drivers/nvdimm/pmem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c index 68940356cad3..8b1fd7f1a224 100644 --- a/drivers/nvdimm/pmem.c +++ b/drivers/nvdimm/pmem.c @@ -414,7 +414,8 @@ static int pmem_attach_disk(struct device *dev, blk_queue_logical_block_size(q, pmem_sector_size(ndns)); blk_queue_max_hw_sectors(q, UINT_MAX); blk_queue_flag_set(QUEUE_FLAG_NONROT, q); - blk_queue_flag_set(QUEUE_FLAG_DAX, q); + if (pmem->pfn_flags & PFN_MAP) + blk_queue_flag_set(QUEUE_FLAG_DAX, q); q->queuedata = pmem; disk = alloc_disk_node(0, nid); -- 2.14.4