Skip to content

Commit

Permalink
libnvdimm, pmem: Change pmem physical sector size to PAGE_SIZE
Browse files Browse the repository at this point in the history
Based on a patch: c8fa317 brd: Request from fdisk 4k alignment by Boaz
Harrosh, allow fdisk to create properly aligned partitions for DAX. This
will also cause mkfs.ext4 to emit a warning if using a file system block
size of less than PAGE_SIZE.

Cc: Dan Williams <[email protected]>
Cc: Ross Zwisler <[email protected]>
Cc: Matthew Wilcox <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Elliott, Robert <[email protected]>
Signed-off-by: Vishal Verma <[email protected]>
Acked-by: Boaz Harrosh <[email protected]>
Acked-by: Ross Zwisler <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
  • Loading branch information
stellarhopper authored and djbw committed Jul 28, 2015
1 parent 39c686b commit 6b47496
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/nvdimm/pmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ static int pmem_attach_disk(struct nd_namespace_common *ndns,
return -ENOMEM;

blk_queue_make_request(pmem->pmem_queue, pmem_make_request);
blk_queue_physical_block_size(pmem->pmem_queue, PAGE_SIZE);
blk_queue_max_hw_sectors(pmem->pmem_queue, UINT_MAX);
blk_queue_bounce_limit(pmem->pmem_queue, BLK_BOUNCE_ANY);
queue_flag_set_unlocked(QUEUE_FLAG_NONROT, pmem->pmem_queue);
Expand Down

0 comments on commit 6b47496

Please sign in to comment.