Skip to content

Commit

Permalink
pmem: only set QUEUE_FLAG_DAX for fsdax mode
Browse files Browse the repository at this point in the history
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"
mode.  These namespaces lack struct page and are prevented from
participating in filesystem DAX as of commit 569d036 ("dax: require
'struct page' by default for filesystem dax").

Signed-off-by: Ross Zwisler <[email protected]>
Suggested-by: Mike Snitzer <[email protected]>
Fixes: 569d036 ("dax: require 'struct page' by default for filesystem dax")
Cc: [email protected]
Acked-by: Dan Williams <[email protected]>
Reviewed-by: Toshi Kani <[email protected]>
Signed-off-by: Mike Snitzer <[email protected]>
  • Loading branch information
Ross Zwisler authored and snitm committed Jun 28, 2018
1 parent a685557 commit 4557641
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/nvdimm/pmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4557641

Please sign in to comment.