All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alison Schofield <alison.schofield@intel.com>
To: Zhihao Cheng <chengzhihao1@huawei.com>
Cc: dan.j.williams@intel.com, vishal.l.verma@intel.com,
	dave.jiang@intel.com, hch@lst.de, ira.weiny@intel.com,
	dlemoal@kernel.org, hare@suse.de, axboe@kernel.dk,
	nvdimm@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] nvdimm/pmem: Set dax flag for all 'PFN_MAP' cases
Date: Thu, 8 Aug 2024 12:28:10 -0700	[thread overview]
Message-ID: <ZrUcSihtUWO2FrI3@aschofie-mobl2> (raw)
In-Reply-To: <20240731122530.3334451-1-chengzhihao1@huawei.com>

On Wed, Jul 31, 2024 at 08:25:30PM +0800, Zhihao Cheng wrote:
> The dax is only supportted on pfn type pmem devices since commit
> f467fee48da4 ("block: move the dax flag to queue_limits"), fix it
> by adding dax flag setting for the missed case.

s/supportted/supported

How about adding failure messages like this:

Trying to mount DAX filesystem fails with this error:
mount: : wrong fs type, bad option, bad superblock on /dev/pmem7, missing codepage or helper program, or other error.
       dmesg(1) may have more information after failed mount system call.

dmesg: EXT4-fs (pmem7): DAX unsupported by block device.


Tested-by: Alison Schofield <alison.schofield@intel.com>

> 
> Fixes: f467fee48da4 ("block: move the dax flag to queue_limits")
> Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com>
> ---
>  drivers/nvdimm/pmem.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c
> index 1ae8b2351654..210fb77f51ba 100644
> --- a/drivers/nvdimm/pmem.c
> +++ b/drivers/nvdimm/pmem.c
> @@ -498,7 +498,7 @@ static int pmem_attach_disk(struct device *dev,
>  	}
>  	if (fua)
>  		lim.features |= BLK_FEAT_FUA;
> -	if (is_nd_pfn(dev))
> +	if (is_nd_pfn(dev) || pmem_should_map_pages(dev))
>  		lim.features |= BLK_FEAT_DAX;
>  
>  	if (!devm_request_mem_region(dev, res->start, resource_size(res),
> -- 
> 2.39.2
> 

  parent reply	other threads:[~2024-08-08 19:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-31 12:25 [PATCH] nvdimm/pmem: Set dax flag for all 'PFN_MAP' cases Zhihao Cheng
2024-07-31 15:53 ` Christoph Hellwig
2024-08-07 18:30 ` Dave Jiang
2024-08-08 19:28 ` Alison Schofield [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-08-09  3:11 Zhihao Cheng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZrUcSihtUWO2FrI3@aschofie-mobl2 \
    --to=alison.schofield@intel.com \
    --cc=axboe@kernel.dk \
    --cc=chengzhihao1@huawei.com \
    --cc=dan.j.williams@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=dlemoal@kernel.org \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=ira.weiny@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nvdimm@lists.linux.dev \
    --cc=vishal.l.verma@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.