[MPlayer-dev-eng] Recording to remote storage...

Bob McElrath mcelrath at draal.physics.wisc.edu
Wed Aug 28 08:26:45 CEST 2002


Kevin Liao [kevinliao at iei.com.tw] wrote:
> Dear all,
> 
> I know this problem may be nothing relative to mplayer itself. But I guess
> someone here could help me...
> The problem is I want to record the captured files to the remote storage
> which is mounted through smb or nfs. Because I know that some cache
> mechanisms existed in linux kernel, I cannot make sure that whether those
> files had been really written to the physical disk after the call write()
> returned successfully. Should I need to call fsync() after each write()?

On a regular filesystem you can mount the volume with the 'sync' mount
option, but this is highly inefficent.  There is no 'sync' option for
nfs, and besides, the filesystem on the server would not in general be
mounted with 'sync'.

Disabling the kernel's cache mechanisms is the purpose of the O_DIRECT
option to open().  Do a google search for it.

Frankly though, it sucks.  We need a more general mechanism to disable
the kernel's buffer cache.

Cheers,
-- Bob

Bob McElrath (rsmcelrath at students.wisc.edu) 
Univ. of Wisconsin at Madison, Department of Physics
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 240 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20020828/fed0fd0f/attachment.pgp>


More information about the MPlayer-dev-eng mailing list