]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - drivers/block/nvme-core.c
NVMe: Set queue max segments
authorKeith Busch <keith.busch@intel.com>
Wed, 12 Aug 2015 22:17:54 +0000 (16:17 -0600)
committerJens Axboe <axboe@fb.com>
Mon, 17 Aug 2015 21:52:23 +0000 (15:52 -0600)
commite824410ffcf4b245296b56c6fdf7b9797fce8c3e
tree3e3b952e272af0b8d79c80d9e5c982f6bf94c677
parent22d109c1bb312dbf321f3d0ab1b0ed94f1a7e304
NVMe: Set queue max segments

This sets the queue's max segment size to match the device's
capabilities. The default of 128 is usable until a device's transfer
capability exceeds 512k, assuming a device page size of 4k. Many nvme
devices exceed that transfer limit, so this lets the block layer know what
kind of commands it to allow to form rather than unnecessarily split them.

One additional segment is added to account for a transfer that may start
in the middle of a page.

Signed-off-by: Keith Busch <keith.busch@intel.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/block/nvme-core.c