Skip to content

Commit d5240fa

Browse files
Zhihao Chengweiny2
authored andcommitted
nvdimm/pmem: Set dax flag for all 'PFN_MAP' cases
The dax is only supported on pfn type pmem devices since commit f467fee ("block: move the dax flag to queue_limits"). 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. Fix the problem by adding dax flag setting for the missed case. Fixes: f467fee ("block: move the dax flag to queue_limits") Signed-off-by: Zhihao Cheng <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Dave Jiang <[email protected]> Reviewed-by: Ira Weiny <[email protected]> Tested-by: Ira Weiny <[email protected]> Tested-by: Alison Schofield <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Ira Weiny <[email protected]>
1 parent afdab70 commit d5240fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/nvdimm/pmem.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ static int pmem_attach_disk(struct device *dev,
498498
}
499499
if (fua)
500500
lim.features |= BLK_FEAT_FUA;
501-
if (is_nd_pfn(dev))
501+
if (is_nd_pfn(dev) || pmem_should_map_pages(dev))
502502
lim.features |= BLK_FEAT_DAX;
503503

504504
if (!devm_request_mem_region(dev, res->start, resource_size(res),

0 commit comments

Comments
 (0)