Tivo's Media File System
Encyclopedia
The MFS or Media File System is a proprietary file system
File system
A file system is a means to organize data expected to be retained after a program terminates by providing procedures to store, retrieve and update data, as well as manage the available space on the device which contain it. A file system organizes data in an efficient manner and is tuned to the...

 used on Tivo
TiVo
TiVo is a digital video recorder developed and marketed by TiVo, Inc. and introduced in 1999. TiVo provides an on-screen guide of scheduled broadcast programming television programs, whose features include "Season Pass" schedules which record every new episode of a series, and "WishList"...

 hard drives for fault tolerant real-time recording of live TV.

Although MFS is still not particularly well understood by programmers unaffiliated with the Tivo corporation, enough is known about the file system to be able to do reads and limited writes. Applications exist to manipulate the file system and objects within it. Most of these applications are reverse engineered from software found on the Tivo itself, as many of the early Tivo programs were little more than specialized scripts that manipulated the data.

The MFS file system is organized more like a database, including transaction logging and rollback capabilities. It utilizes multiple partitions on the drive for a complete system. The partitions come in pairs, with one being the "Application" partition, and the other being the "Media" partition. The Media region is invariably quite large, and organized into long continuous blocks of data, with a variable block size that has a minimum of at least 1 megabyte. This is because it is designed to store large sections of video.

Each object in the Tivo file system is assigned an ID, which is interally called the "FSID" (presumably, file system ID). There are (at least) 4 types of objects that MFS supports: Streams (recordings, audio or video), Directory, Database, and Files. All Stream objects are stored in the MFS media regions, while the other types are stored in "application" regions.

The file system itself is implemented entirely in the Linux userspace. The primary reason Tivo devised such a system is because they needed a way to store large continuous sections of data easily in a manner that lent itself well to streaming that data directly to the media decoders in the Tivo devices, without being CPU dependent. Thus, the CPU has very little involvement in playback and recording functionality, simply directing the encoder/decoder chips to stream data directly to the drives via direct memory access
Direct memory access
Direct memory access is a feature of modern computers that allows certain hardware subsystems within the computer to access system memory independently of the central processing unit ....

while mapping sections of virtual memory onto the drive. The main CPU then orchestrates the entire affair. The result of this is that data stored on the MFS media region is not formatted into normal files, as such, but is a direct data stream that is indexed by the database sections in the MFS application region.
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK