RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1436562 - [QEMU] scsi-generic: make up opt xfer len if not reported by backend
Summary: [QEMU] scsi-generic: make up opt xfer len if not reported by backend
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Fam Zheng
QA Contact: Xueqiang Wei
URL:
Whiteboard:
Depends On:
Blocks: 1436582
TreeView+ depends on / blocked
 
Reported: 2017-03-28 08:11 UTC by Xueqiang Wei
Modified: 2020-12-14 08:24 UTC (History)
12 users (show)

Fixed In Version: qemu-kvm-rhev-2.9.0-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-02 04:35:59 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:2392 0 normal SHIPPED_LIVE Important: qemu-kvm-rhev security, bug fix, and enhancement update 2017-08-01 20:04:36 UTC

Description Xueqiang Wei 2017-03-28 08:11:30 UTC
Description of problem:

VM gets paused due to 'eother' when a direct lun that is configured as Virtio-SCSI with scsi passthrough enabled and is atached via an Emulex FibreChannel HBA is written to with block sizes greater than 256kb.


Version-Release number of selected component (if applicable):
Kernel-3.10.0-514.6.1.el7.x86_64
qemu-kvm-rhev-2.6.0-28.el7_3.9
libvirt-client-2.0.0-10.el7.x86_64


How reproducible:
5/5


Steps to Reproduce:
1. Create a RHEL7.3.z host that has an Emulex FibreChannel HBA.
2. Configure a VM with a direct lun that is configured for Virtio-SCSI with scsi passthrough enabled.

    <disk type='block' device='lun' sgio='filtered' snapshot='no'>
      <driver name='qemu' type='raw' cache='none' error_policy='stop' io='native'/>
      <source dev='/dev/mapper/360014059b31089df5114cbd830320c2b'/>
      <backingStore/>
      <target dev='sdb' bus='scsi'/>
      <alias name='scsi0-0-0-1'/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    </disk>
3. Within the guest run 'dd if=/dev/zero of=/dev/sda bs=256k count=1 oflag=direct'.

4. check value of lpfc_sg_seg_cnt

Emulex lpfc LUN

/sys/block/sdck
[root@dhcp40-198 sdck]# cat ./queue/max_segments
64

5. Within the guest run 'dd if=/dev/zero of=/dev/sda bs=512k count=1 oflag=direct'.


Actual results:
After step 3, the guest is running, no error occurs
After step 4, For Emulex lpfc: 64
After step 5, the guest is pause


Expected results:
After step 3, the guest is running, no error occurs
After step 4, For Emulex lpfc, it shoud be 256 (Change to 256 on LPFC)
After step 5, the guest is not pause



Additional info:

Comment 1 Fam Zheng 2017-03-28 12:44:04 UTC
Merged for upstream QEMU 2.9:


commit bed58b4443b001227b953dca80ce76fa76ea0fc1
Author: Fam Zheng <famz>
Date:   Mon Mar 27 22:26:25 2017 +0800

    scsi-generic: Fill in opt_xfer_len in INQUIRY reply if it is zero
    
    When opt_xfer_len is zero, Linux ignores max_xfer_len erroneously.
    
    While that obviously should be fixed, we do older guests a favor to
    always filling in a value.
    
    Signed-off-by: Fam Zheng <famz>
    Message-Id: <20170327142625.1249-1-famz>
    Signed-off-by: Paolo Bonzini <pbonzini>

Comment 2 Fam Zheng 2017-03-28 12:48:07 UTC
Reproducer steps for reference:

1. On host, find a LUN that doesn't set opt_xfer_len in INQUIRY reply (check with "sg_inq -p 0xb0 /dev/sdX"). Such as the Emulex one in comment 0.

2. Passthrough the disk to guest as scsi-block.

3. Check that both max_xfer_len and opt_xfer_len are reported.

Comment 3 Xueqiang Wei 2017-04-24 08:06:58 UTC
According to https://bugzilla.redhat.com/show_bug.cgi?id=1418065#c85, verify this bug.

Comment 5 errata-xmlrpc 2017-08-02 04:35:59 UTC
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/RHSA-2017:2392


Note You need to log in before you can comment on or make changes to this bug.