On Thu, 3 Nov 2011, Barry Song wrote: > > I agree, we can remove the call in do_prevent_allow(). But it would be > > a good idea to add a comment explaining that we disobey the SCSI spec > > here because the cache will be synced later in fsg_lun_close(). If the > > user removes the physical storage before doing a logical eject then the > > data may be corrupted; but that has always been true for Linux systems. > > so gadget driver can either not do sync at all(leave that job to linux > and users) or only do fsync when it wants to close the file it uses. > the gadget driver, as an user of vfs, it might make sense to sync the > file it uses before it doesn't want to use it. so i think yuping's > last patch is kind of right. Yes, the patch is acceptable except for one thing: Where the fsg_lun_fsync_sub() call is removed, a comment needs to be added explaining why it's okay not to do the sync at that point. 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