[vdr] [PATCH] Direct I/O support v1

Artur Skawina art_k at o2.pl
Thu Mar 27 22:07:38 CET 2008


This change makes vdr write the video stream directly to disk, bypassing
OS caches. O_DIRECT is used if it is supported, falling back to "normal"
I/O and fadvise() if not. Only recording is affected, playback remains
unchanged.

I did this to see if using direct i/o made sense for vdr, wasn't convinced
before. Avoiding all the fadvise hacks and especially the fdatasyncs on
close seems to be worth it though. 

Only lightly tested, but seems to work, i tried a few recordings on both
ext3 and NFS and didn't notice any missing data yet ;) Upgraded all vdrs
and will keep testing for some time, but in case anyone else would like
to try (or even better improve) it, patch is below.

This patch is based on top of the one I posted in the "Problems playing
ongoing recordings?" thread, so you'll need to apply that one before
applying this one. Should work on both 1.4 and 1.6.

artur
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch.txt
Url: http://www.linuxtv.org/pipermail/vdr/attachments/20080327/7b88a9ab/attachment.txt 


More information about the vdr mailing list