On 12/23/09 16:48, Somebody in the thread at some point said: Hi Alan -
It makes sense to add a mechanism for notifying userspace when the host ejects the medium. You don't need a uevent to do that; a simple sysfs_notify() on the "file" attribute would be enough.
The uevent is there to provide the arbitration sync explicit handshake action -->
There doesn't seem to be any reason for the whole arbitration thing. Instead of waiting for the host to access the medium, why not simply umount the shared partition as soon as the medium is loaded? Hosts typically do periodic scans for new media; you'd lose only a second or thereabouts.
It's because the userspace may be holding open files in the mounted filesystem, disallowing simple umount of it from kernel side.
There may need to be an arbitrarily complicated app-specific action in response to the event that the host wants to own the storage, involving closing down / killing apps or other stuff that involves interaction with the user.
For these reasons an actual handshake that can return an accept or fail response seems like the right way.
-Andy -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html