Re: Flushing buffer on file copy on linux

2012-08-15 Thread Antoine Pitrou
J gmail.com> writes: > > Now, the problem I have is that linux tends to buffer data writes to a > device, and I want to work around that. When run in normal non-stress > mode, the program is slow enough that the linux buffers flush and put > the file on disk before the hash occurs. However, whe

Re: Flushing buffer on file copy on linux

2012-08-14 Thread Cameron Simpson
On 14Aug2012 22:55, J wrote: | Now, the problem I have is that linux tends to buffer data writes to a | device, and I want to work around that. To what _specific_ purpose? Benchmarking? Ensuring the device can be pulled? Ensuring another program can see the data? (The last should be taken care of

Flushing buffer on file copy on linux

2012-08-14 Thread J
I was hoping someone could give me some ideas for a particular problem. I've got a python program that is used for basic testing of removable storage devices (usb, mmc, firewire, etc). Essentially, it looks for a mounted device (either user specified, or if not, the program loops through all remo