Skip to content
Commit 83e32a59 authored by Xuewei Zhang's avatar Xuewei Zhang Committed by Martin K. Petersen
Browse files

scsi: sd: Contribute to randomness when running rotational device

Currently a scsi device won't contribute to kernel randomness when it uses
blk-mq. Since we commonly use scsi on rotational device with blk-mq, it make
sense to keep contributing to kernel randomness in these cases. This is
especially important for virtual machines.

commit b5b6e8c8

 ("scsi: virtio_scsi: fix IO hang caused by automatic irq
vector affinity") made all virtio-scsi device to use blk-mq, which does not
contribute to randomness today. So for a virtual machine only having
virtio-scsi disk (which is common), it will simple stop getting randomness
from its disks in today's implementation.

With this patch, if the above VM has rotational virtio-scsi device, then it
can still benefit from the entropy generated from the disk.

Reported-by: default avatarXuewei Zhang <xueweiz@google.com>
Signed-off-by: default avatarXuewei Zhang <xueweiz@google.com>
Reviewed-by: default avatarMing Lei <ming.lei@redhat.com>
Reviewed-by: default avatarMaciej Żenczykowski <maze@google.com>
Reviewed-by: default avatarBart Van Assche <bvanassche@acm.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent adad633a
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment