Skip to content
Commit 45686b61 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe
Browse files

nvme: fix max_segments integer truncation



The block layer uses an unsigned short for max_segments.  The way we
calculate the value for NVMe tends to generate very large 32-bit values,
which after integer truncation may lead to a zero value instead of
the desired outcome.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reported-by: default avatarJeff Lien <Jeff.Lien@hgst.com>
Tested-by: default avatarJeff Lien <Jeff.Lien@hgst.com>
Reviewed-by: default avatarKeith Busch <keith.busch@intel.com>
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent da35825d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment