RE: usb-storage: fsync() take too much time when handing ALLOW_MEDIUM_REMOVAL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: linux-usb-owner@xxxxxxxxxxxxxxx [mailto:linux-usb-owner@xxxxxxxxxxxxxxx] On Behalf Of Alan Stern
> Sent: Thursday, October 27, 2011 9:05 AM
> 
> On Thu, 27 Oct 2011, Barry Song wrote:
> 
> > > Did you understand when I said that closing the backing file would
> > > flush the page cache if the backing file is a device?
> >
> > that is not important. my point is we can just think this gadget as an
> > user to vfs on target board, actually it is.
> > so there is no any necessarity to do any fsync at all.
> >
> > when target board is disconnected from pc, pc has the duty to do the
> > fsync to this gadget.
> 
> And yet Windows doesn't seem to do this.  Which means the gadget driver
> has to take responsibility.

I'm pretty sure Windows assumes that once a write to a removable device
completes, the data is safe. Most Windows users don't bother to "safely
eject" a thumb drive, they just yank it once the transfer is shown as
complete.

-- 
Paul

> >  after that, the board which this gadget works on
> > takes the duty to do fsync. all should be done by generic OS way but
> > not by gadget itself.
> Yes, it should be done by the target's OS.  I just sent a message to
> the SCSI mailing list asking why this doesn't happen.
> 
> 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


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux