-
-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed missing media change handling #690
Conversation
uweseimet
commented
Feb 21, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ran a test on Mac OS 8.6 and patched Apple CD-ROM drivers, just for the record. We've established that Mac OS removable media handling is non-standard, so don't read to much into these results:
- Ejecting an inserted image from RaSCSI leads to the media still appearing as inserted in the Finder.
- It's possible to copy a file off the media to local storage, but the resulting file is invalid. (We know that the Finder keeps a record of volume information in memory)
- Inserting another image from RaSCSI does not lead to the new media appearing in the Finder.
- It's possible to eject the media in the Finder at this point, which leads to the second media being ejected in RaSCSI.
- Inserting a third media in RaSCSI makes it appear correctly in the Finder.
- Mac OS remained stable throughout this. In my previous tests Mac OS used to hang up when trying to access media it thought was still inserted, but this is no longer the case. I'm not certain if these latest code changes affected the behavior (no time to test further right now.)
@rdmark Up to now the computer did not have any chance to learn about a media change, because RaSCSI did not report it at all. Now the change is reported as required by the SCSI standard, with the error code reserved for this case. RaSCSI now reports the same as my real SCSI removable media drives do. |
@rdmark Why do you think that the Mac's removable media handling is non-standard? The only component that can reliably report a media change is the drive. Any other way to detect a change would mean to constantly poll the drive in order to check whether it is ready or not. (Do the RaSCSI logfiles reflect this?) This kind of polling is very inefficient, as we can see with the Daynaport driver, which is constantly polling for data. |
@rdmark By the way, there is not just the NOT_READY_TO_READY_CHANGE additional sense code, which is now correctly reported after a medium was inserted, but also the READY_TO_NOT_READY_CHANGE counterpart. I don't think that RaSCSI reports this when a medium is ejected, but the Mac might expect tihis in order for the Finder to do the right thing. |
@uweseimet I don't see evidence of constant polling in the trace logs either when a disk in inserted, or the emulated drive is empty. |
@rdmark All those messages actually look like constant polling. TEST UNIT READY is sent all the time. Whether this really makes sense only Apple knows ;-). |