]> git.baikalelectronics.ru Git - kernel.git/commit
nvme: set discard_alignment to zero
authorDavid Disseldorp <ddiss@suse.de>
Fri, 24 Nov 2017 15:30:53 +0000 (16:30 +0100)
committerChristoph Hellwig <hch@lst.de>
Fri, 15 Dec 2017 14:13:32 +0000 (15:13 +0100)
commit9437aeceb56ab60fade4701257ec469d77a23f61
tree9f9a631324126407916055efc58b878900993637
parenta6c9bebf30975e70485deab89eb396f39bb27472
nvme: set discard_alignment to zero

Similar to 5ed5accb2dd2 ("rbd: set discard_alignment to zero"), NVMe
devices are currently incorrectly initialised with the block queue
discard_alignment set to the NVMe stream alignment.

As per Documentation/ABI/testing/sysfs-block:
  The discard_alignment parameter indicates how many bytes the beginning
  of the device is offset from the internal allocation unit's natural
  alignment.

Correcting the discard_alignment parameter to zero has no effect on how
discard requests are propagated through the block layer - @alignment in
__blkdev_issue_discard() remains zero. However, it does fix other
consumers, such as LIO's Block Limits VPD response.

Signed-off-by: David Disseldorp <ddiss@suse.de>
Reviewed-by: Jens Axboe <axboe@kernel.dk>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/core.c