diff options
author | Dan Williams <dan.j.williams@intel.com> | 2017-06-04 12:12:07 +0900 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2017-06-15 14:31:39 -0700 |
commit | f979b13c3cc51584882bffa32965f34e5afa3b9b (patch) | |
tree | b1e4337476603d8e40790dfc9d7c1097237d8b53 /drivers/nvdimm/pmem.c | |
parent | c12c48ce869d72029d70666f615cbd8f67fc14e9 (diff) | |
download | talos-obmc-linux-f979b13c3cc51584882bffa32965f34e5afa3b9b.tar.gz talos-obmc-linux-f979b13c3cc51584882bffa32965f34e5afa3b9b.zip |
libnvdimm, label: honor the lba size specified in v1.2 labels
Previously we only honored the lba size for blk-aperture mode
namespaces. For pmem namespaces the lba size was just assumed to be 512.
With the new v1.2 label definition and compatibility with other
operating environments, the ->lbasize property is now respected for pmem
namespaces.
Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/nvdimm/pmem.c')
-rw-r--r-- | drivers/nvdimm/pmem.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c index c544d466ea51..5c45e178bd4a 100644 --- a/drivers/nvdimm/pmem.c +++ b/drivers/nvdimm/pmem.c @@ -342,6 +342,7 @@ static int pmem_attach_disk(struct device *dev, blk_queue_write_cache(q, true, true); blk_queue_make_request(q, pmem_make_request); blk_queue_physical_block_size(q, PAGE_SIZE); + blk_queue_logical_block_size(q, pmem_sector_size(ndns)); blk_queue_max_hw_sectors(q, UINT_MAX); blk_queue_bounce_limit(q, BLK_BOUNCE_ANY); queue_flag_set_unlocked(QUEUE_FLAG_NONROT, q); |