Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1215953

Summary: [virtio-win][viostor]virtio-blk-pci should support surprise-removal during device in use
Product: Red Hat Enterprise Linux 7 Reporter: lijin <lijin>
Component: virtio-winAssignee: Vadim Rozenfeld <vrozenfe>
Status: CLOSED WONTFIX QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1CC: bcao, jinzhao, juli, rbalakri, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-06-28 23:13:43 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:
Attachments:
Description Flags
virtio-blk-pci hot-unplug none

Description lijin 2015-04-28 08:29:21 UTC
Created attachment 1019569 [details]
virtio-blk-pci hot-unplug

Description of problem:
QE hit similar issue(unplug failed) when do hot-unplug virtio-win device in use in windows guest.

According to following page,linux guest can do the surprised unplug correctly;
https://mojo.redhat.com/docs/DOC-187573

And as Gal said in https://bugzilla.redhat.com/show_bug.cgi?id=957328#c20
"The driver can tell Windows that it support a surprise-removal"

So file this bug to track virtio-blk-pci surprise-removal

Version-Release number of selected component (if applicable):


How reproducible:
100%

Steps to Reproduce:
1.boot a win7-32 guest with one virtio-blk-pci data disk;
2.copy a big file from smb server to data disk
3.hotunplug the virtio-blk-pci during step2

Actual results:
guest prompts a window as "the device is currently in use.xxxx"(please check the attachment).
And in device manager the virtio-blk Driver still exist.

Expected results:
virtio-blk-pci can be surprised removed without any error

Additional info:

Comment 2 Vadim Rozenfeld 2015-06-28 23:13:43 UTC
(In reply to lijin from comment #0)
> Created attachment 1019569 [details]
> virtio-blk-pci hot-unplug
> 
> Description of problem:
> QE hit similar issue(unplug failed) when do hot-unplug virtio-win device in
> use in windows guest.
> 
> According to following page,linux guest can do the surprised unplug
> correctly;
> https://mojo.redhat.com/docs/DOC-187573

Windows and Linux can be very different in regard to how they handle PnP requests.

> 
> And as Gal said in https://bugzilla.redhat.com/show_bug.cgi?id=957328#c20
> "The driver can tell Windows that it support a surprise-removal"
> 

Well, this is a complicity incorrect statement. Some WDM-style driver can say that it's OK for the underlying device to be removed surprisingly, and these drivers even can implement some optimised paths for handling surprise removal sequence. If it is the case, than Windows will depress a pop-up dialog saying that a device has been removed surprisingly. Surprise removal is nothing else then just brutal force pulling a device out of it's slot or socket and a device driver cannot do anything about this situation, at leas it cannot agree or disagree with that situation. 
What MST said in https://bugzilla.redhat.com/show_bug.cgi?id=957328#c18 is that QEMU doesn't support this brutal force device removal, but handles "device_del" properly, by sending an appropriate request to the guest to make a proper decision to handle or to reject this request. Handling or failing a PnP request is a different and a very complicated issue. But technically, any WDM driver in a device stack can fail a PnP request based on the bunch of different facts and conditions (for example if the underlying device is idle or busy. Technically, it is exactly what happens in your case, when FS driver just rejects the PnP request for the storage device removal).

Closing this bug as wontfix.
BTW, we closed a very similar bug some time ago for absolutely the same reason
as I mentioned above.

Best regards,
Vadim.  

> So file this bug to track virtio-blk-pci 
> 
> Version-Release number of selected component (if applicable):
> 
> 
> How reproducible:
> 100%
> 
> Steps to Reproduce:
> 1.boot a win7-32 guest with one virtio-blk-pci data disk;
> 2.copy a big file from smb server to data disk
> 3.hotunplug the virtio-blk-pci during step2
> 
> Actual results:
> guest prompts a window as "the device is currently in use.xxxx"(please check
> the attachment).
> And in device manager the virtio-blk Driver still exist.
> 
> Expected results:
> virtio-blk-pci can be surprised removed without any error
> 
> Additional info:

Comment 3 jingzhao 2016-09-14 09:17:47 UTC
*** Bug 1375901 has been marked as a duplicate of this bug. ***

Comment 4 CongLi 2018-07-18 07:26:22 UTC
*** Bug 1002384 has been marked as a duplicate of this bug. ***