libnvdimm, pmem: Change pmem physical sector size to PAGE_SIZE

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]>
This commit is contained in:
Vishal Verma 2015-07-23 11:58:48 -06:00 • committed by Dan Williams
commit 6b47496a6f

View file

@ -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);