Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

target/rd: Set ramdisk as non rotational device

Since a RAM backend device is not really a rotational device,
we set it as is_nonrot=1 which will be forwarded in VPD page 0xb1
(block device characteristics) response.

Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>

authored by

Sagi Grimberg and committed by
Nicholas Bellinger
5dacbfc9 3aa3c67b

+1
+1
drivers/target/target_core_rd.c
··· 333 333 dev->dev_attrib.hw_block_size = RD_BLOCKSIZE; 334 334 dev->dev_attrib.hw_max_sectors = UINT_MAX; 335 335 dev->dev_attrib.hw_queue_depth = RD_MAX_DEVICE_QUEUE_DEPTH; 336 + dev->dev_attrib.is_nonrot = 1; 336 337 337 338 rd_dev->rd_dev_id = rd_host->rd_host_dev_id_count++; 338 339