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]

 



On Fri, 28 Oct 2011, Felipe Balbi wrote:

> > 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.
> 
> That's configurable. You can optimize for performance - which will do
> asynchronous writes - or you can optimize for removal - which will all
> SCSI Writes to be synchronous.
> 
> Commit a93917d39fc388c4761d2530af82513e2d3bf9f6 added a module parameter
> to ignore the FUA bit.
> 
> The point is, if FUA is set and all writes are synchronous already, do
> we need to fsync() again ?

No, we shouldn't need to.  But turn it around.  If we are ignoring FUA, 
can we afford not to fsync?

At this point, the real question is why the kernel doesn't
automatically sync the cache when a block device is closed.  That's not
a USB problem, however.

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