mirror of
https://git.proxmox.com/git/qemu-server
synced 2026-01-24 17:25:54 +00:00
only use scsi-block with explicit opt-in
since it can cause I/O errors and data corruption in low memory or highly fragmented memory situations since Qemu 2.7 use scsi-hd by default instead Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
parent
17138aa6ff
commit
8e3c33ab64
@ -820,6 +820,15 @@ my %queues_fmt = (
|
||||
}
|
||||
);
|
||||
|
||||
my %scsiblock_fmt = (
|
||||
scsiblock => {
|
||||
type => 'boolean',
|
||||
description => "whether to use scsi-block for full passthrough of host block device\n\nWARNING: can lead to I/O errors in combination with low memory or high memory fragmentation on host",
|
||||
optional => 1,
|
||||
default => 0,
|
||||
},
|
||||
);
|
||||
|
||||
my $add_throttle_desc = sub {
|
||||
my ($key, $type, $what, $unit, $longunit, $minimum) = @_;
|
||||
my $d = {
|
||||
@ -876,6 +885,7 @@ my $scsi_fmt = {
|
||||
%drivedesc_base,
|
||||
%iothread_fmt,
|
||||
%queues_fmt,
|
||||
%scsiblock_fmt,
|
||||
};
|
||||
my $scsidesc = {
|
||||
optional => 1,
|
||||
@ -913,6 +923,7 @@ my $alldrive_fmt = {
|
||||
%iothread_fmt,
|
||||
%model_fmt,
|
||||
%queues_fmt,
|
||||
%scsiblock_fmt,
|
||||
};
|
||||
|
||||
my $efidisk_fmt = {
|
||||
@ -1493,7 +1504,7 @@ sub print_drivedevice_full {
|
||||
if ($drive->{file} =~ m|^/|) {
|
||||
$path = $drive->{file};
|
||||
if (my $info = path_is_scsi($path)) {
|
||||
if ($info->{type} == 0) {
|
||||
if ($info->{type} == 0 && $drive->{scsiblock}) {
|
||||
$devicetype = 'block';
|
||||
} elsif ($info->{type} == 1) { # tape
|
||||
$devicetype = 'generic';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user