Bug 1471625
Summary: | [RFE] scsi-block device should support "stop on error" | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | yilzhang |
Component: | qemu-kvm-rhev | Assignee: | Fam Zheng <famz> |
Status: | CLOSED ERRATA | QA Contact: | Xueqiang Wei <xuwei> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.4 | CC: | aliang, chayang, coli, famz, juzhang, knoel, michal.skrivanek, michen, mrezanin, mtessun, qzhang, virt-maint |
Target Milestone: | rc | Keywords: | FutureFeature |
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | qemu-kvm-rhev-2.12.0-1.el7 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2018-11-01 11:01:10 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
yilzhang
2017-07-17 06:12:16 UTC
1. Recording Paolo's comment in 1468413#c8: "Yes, that's correct. scsi-generic and scsi-block do not support it, but it can be added at least to scsi-block." 2. IMO, if not add attribute 'werror/rerror' to scsi-block, it's better to provide a warning or error info like 'scsi-generic'. ./hw/scsi/scsi-generic.c:526: error_setg(errp, "Device doesn't support drive option werror"); Thanks. Proposed a small change for upstream QEMU: Author: Fam Zheng <famz> Date: Thu Aug 17 17:20:06 2017 +0800 scsi-block: Add qdev error properties This makes the werror/rerror options available on the scsi-block device, to allow user specify error handling policy in the same way as scsi-hd etc. Signed-off-by: Fam Zheng <famz> diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c index 5f1e5e8070..27d917f7c3 100644 --- a/hw/scsi/scsi-disk.c +++ b/hw/scsi/scsi-disk.c @@ -2972,6 +2972,7 @@ static const TypeInfo scsi_cd_info = { #ifdef __linux__ static Property scsi_block_properties[] = { + DEFINE_BLOCK_ERROR_PROPERTIES(SCSIDiskState, qdev.conf), \ DEFINE_PROP_DRIVE("drive", SCSIDiskState, qdev.conf.blk), DEFINE_PROP_END_OF_LIST(), }; reproduce bug on qemu-kvm-rhev-2.10.0-21.el7_5.1 # /usr/libexec/qemu-kvm -device scsi-block,? scsi-block.bootindex=int32 scsi-block.rotation_rate=uint16 scsi-block.drive=str (Node name or ID of a block device to use as a backend) scsi-block.lun=uint32 scsi-block.share-rw=bool scsi-block.channel=uint32 scsi-block.scsi-id=uint32 # /usr/libexec/qemu-kvm -device scsi-generic,? scsi-generic.bootindex=int32 scsi-generic.drive=str (Node name or ID of a block device to use as a backend) scsi-generic.lun=uint32 scsi-generic.share-rw=bool scsi-generic.channel=uint32 scsi-generic.scsi-id=uint32 {"execute": "query-block"} {"device": "drive_stg0", "locked": false, "removable": false, "inserted": {"iops_rd": 0, "detect_zeroes": "off", "image": {"virtual-size": 52428800, "filename": "/dev/sdb", "format": "raw", "actual-size": 0, "dirty-flag": false}, "iops_wr": 0, "ro": false, "node-name": "#block359", "backing_file_depth": 0, "drv": "raw", "iops": 0, "bps_wr": 0, "write_threshold": 0, "encrypted": false, "bps": 0, "bps_rd": 0, "cache": {"no-flush": false, "direct": true, "writeback": true}, "file": "/dev/sdb", "encryption_key_missing": false}, "qdev": "stg0", "type": "unknown"}]} Tested on qemu-kvm-rhev-2.12.0-1.el7 # /usr/libexec/qemu-kvm -device scsi-block,? scsi-block.bootindex=int32 scsi-block.rotation_rate=uint16 scsi-block.drive=str (Node name or ID of a block device to use as a backend) scsi-block.lun=uint32 scsi-block.scsi_version=int32 scsi-block.share-rw=bool scsi-block.werror=BlockdevOnError (Error handling policy, report/ignore/enospc/stop/auto) scsi-block.channel=uint32 scsi-block.rerror=BlockdevOnError (Error handling policy, report/ignore/enospc/stop/auto) scsi-block.scsi-id=uint32 # /usr/libexec/qemu-kvm -device scsi-generic,? scsi-generic.bootindex=int32 scsi-generic.drive=str (Node name or ID of a block device to use as a backend) scsi-generic.lun=uint32 scsi-generic.share-rw=bool scsi-generic.channel=uint32 scsi-generic.scsi-id=uint32 {"execute": "query-block"} {"io-status": "ok", "device": "drive_stg0", "locked": false, "removable": false, "inserted": {"iops_rd": 0, "detect_zeroes": "off", "image": {"virtual-size": 52428800, "filename": "/dev/sdb", "format": "raw", "actual-size": 0, "dirty-flag": false}, "iops_wr": 0, "ro": false, "node-name": "#block321", "backing_file_depth": 0, "drv": "raw", "iops": 0, "bps_wr": 0, "write_threshold": 0, "encrypted": false, "bps": 0, "bps_rd": 0, "cache": {"no-flush": false, "direct": true, "writeback": true}, "file": "/dev/sdb", "encryption_key_missing": false}, "qdev": "stg0", "type": "unknown"}]} As the details above, scsi-block device support "stop on error" already, so verify the bug. By the way, scsi-generic device not support "stop on error" yet. I don't know any demand on that feature. What is the use case? I think storage's SCSI passthrough should use scsi-block. scsi-generic is more for non-storage and TBH I don't know if werror/rerror semantics apply there. Restoring Michal's needinfo. According to Comment 2, tested scsi-generic device on qemu-kvm-rhev-2.12.0-7.el7 It has warning as below: (qemu) qemu-kvm: -device scsi-generic,bus=bus1.0,drive=scsi-disk0,id=disk: Device doesn't support drive option werror (qemu) qemu-kvm: -device scsi-generic,bus=bus1.0,drive=scsi-disk0,id=disk: Device doesn't support drive option rerror So verify this bug. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2018:3443 The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days |