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

target/file: Set is_nonrot attribute

Set is_nonrot attribute according to the block queue if the backend
device is a block device.

Signed-off-by: Asias He <asias@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>

authored by

Asias He and committed by
Nicholas Bellinger
0463a3fe 86d71829

+3
+3
drivers/target/target_core_file.c
··· 192 192 * the smaller WRITE_SAME(10) only has a two-byte block count. 193 193 */ 194 194 dev->dev_attrib.max_write_same_len = 0xFFFF; 195 + 196 + if (blk_queue_nonrot(q)) 197 + dev->dev_attrib.is_nonrot = 1; 195 198 } else { 196 199 if (!(fd_dev->fbd_flags & FBDF_HAS_SIZE)) { 197 200 pr_err("FILEIO: Missing fd_dev_size="