diff --git a/drivers/target/target_core_file.c b/drivers/target/target_core_file.c index 9063c31df9e1352f05f2997d39dd1476dd8cd6dc..58ed683e04aefc942b7456fae4b9c6ba10f05a00 100644 --- a/drivers/target/target_core_file.c +++ b/drivers/target/target_core_file.c @@ -192,6 +192,9 @@ static int fd_configure_device(struct se_device *dev) * the smaller WRITE_SAME(10) only has a two-byte block count. */ dev->dev_attrib.max_write_same_len = 0xFFFF; + + if (blk_queue_nonrot(q)) + dev->dev_attrib.is_nonrot = 1; } else { if (!(fd_dev->fbd_flags & FBDF_HAS_SIZE)) { pr_err("FILEIO: Missing fd_dev_size="