Mikulas Patocka wrote:But discarding data sometimes on USB unplug is even worse than discarding
data always --- users will by experimenting learn that linux doesn't
discard write-cached data and reminds them to replug the device --- and
one day, randomly, they lose their data because of some memory management
It should not happen provided the total amount of dirty data for
detachable devices is restricted to allow enough room for opening a
That's no different, in principle, than the restrictions that are used-
to ensure some types of kernel memory allocation always succeed.
There's no exact calculation, just a notion of "this many megabytes
should be enough for a dialog".