site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com On Jul 4, 2008, at 9:03, Tim Schooley wrote: -- Soren Spies CoreOS::IOTeam _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... 1.1) In the kext, simply block IO to the devices. This seems the quickest and most elegant way, since a) it won't remove the device from the system, b) it won't run into "Volume Busy" errors that could occur using an unmount instead, c) Once unlocked, user-space applications that may have had files open on the device can continue on their merry way. BUT! Does the OS flush devices before sleeping? When "WillSleep" is called, has all flushing finished? Beware of deadlocks between in trying to get unlocked. If your daemon needs to pop up UI to re-authenticate the device but the daemon is talking to a service which happens to be trying to use the volume being served by your kext ... the block I/Os will prevent your dialog from coming up which will prevent the I/O completing ... and everything will eventually end it a spinning beachball of death. This email sent to site_archiver@lists.apple.com