On Thu, 24 May 2012, Pantelis Antoniou wrote: > OS-X uses a sequence on unmounting that makes us close the backing > file. What do you mean? Does OS-X send an eject command (as far as I know, that's the only command that will cause the backing file to be closed)? > Apparently there's no way to open it again, which makes it > impossible to remount without rmmod'ing g_mass_storage. That's not true at all. If the backing file has been closed, it can be re-opened (or another file can be opened in its place) by writing the filename to the gadget's "file" attribute in sysfs. > Fix this by adding a media_ejected flag to each lun, and keeping > track of it properly. > > Any other method (i.e. preventing unmount, and not keeping track > of the eject status) failed due to OS-X sending start stop commands > after the unmount and checking again. NAK. This is definitely not the the right thing to do. Alan Stern -- 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