User: Password:
Subscribe / Log in / New account

Useful feature

Useful feature

Posted Nov 19, 2010 1:51 UTC (Fri) by brouhaha (subscriber, #1698)
Parent article: Punching holes in files

It will be great to have this feature in Linux, in a file-system-agnostic way.

Back when my colleagues and I developed the original ReplayTV (which was not Linux-based, alas), we used the same concept to implement the variable-sized live-TV rewind buffer. Some of the engineers wanted to use a fixed-size file as a circular buffer, but I pointed out that if we used hole-punching (and 64-bit file offsets), the live-TV buffer could potentially use all otherwise unused disk space, and that as we needed to reclaim space for new video, we could just punch a hole at the beginning of the file. Effectively, the conceptual beginning of the file moves forward as the oldest video in the buffer is discarded.

This worked out really well, though I'm not sure whether they continued to use this approach when they switched to VxWorks for the 4000-series and later units.

(Log in to post comments)

Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds