linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bob Copeland <me@bobcopeland.com>
To: linux-fsdevel@vger.kernel.org
Cc: Bob Copeland <me@bobcopeland.com>
Subject: [RFC][PATCH 0/7] Optimized MPEG file system
Date: Wed, 15 Mar 2006 22:01:44 -0500	[thread overview]
Message-ID: <11424781042886-git-send-email-me@bobcopeland.com> (raw)
In-Reply-To: 

The following set of patches implement a new filesystem: the "Optimized
MPEG File System" or OMFS (their name, not mine; I make no claims of
actual optimization or utility with digital video).  OMFS is used in
ReplayTV as well as the Rio Karma, but has only been tested with the
latter.  This is a bit rough around the edges but I'd like to get some
feedback in its current state.  The structures were reverse engineered
so not everything is known, but here are the basics:

 - The directories are implemented as a hash table with hashing on the name.
   The mixture of an unfortunate hash function, file naming policy, and
   block size means that in practice only a small number of buckets are
   utilized, and chains tend to be somewhat long (usually 5 or 6 links).

 - Files are implemented as a table of extents: a list of block numbers
   and the count of contiguous blocks allocated starting from that block.

 - All filesystem objects have CRCs and mirrors.  Presumably this is so 
   online consistency checks can be made; this module updates them but 
   otherwise ignores them.

 - ReplayTV, I am told (note I have never seen an RTV image), does not 
   have an on disk free bitmap.  The Karma has one however.  Presumably the
   ReplayTV scans the entire disk every time it's mounted.

 - The fs typically uses a large block size (8k).  It also only uses 
   part of a given block for "system" structures (e.g. inodes), so there is 
   a lot of wasted space in the book-keeping.

 - Some ReplayTV models write everything byte-swapped.  I don't do anything
   about this.

More documentation can be found at:
http://rtvpatch.sourceforge.net/omfs.html
http://bobcopeland.com/karma/

Consequently, the following "interesting" choices were made:

 - Because the blocksize is larger than a page, the FS sets the blocksize
   to the system structure blocksize (usually 2k) and multiplies the block
   numbers accordingly when needed.

 - In order to traverse the hash table inside readdir without extra state,
   the bucket index is encoded into the upper byte of fpos and the link
   index is stored in the lower 24 bits.  No existing block size allows 
   more than 256 hash buckets.

 - To support the ReplayTV, the module allocates space for the whole block 
   bitmap at mount time instead of reading the bitmap blocks as needed.   
   The code to traverse the tree for RTV at startup isn't there yet.

 - CRCs and mirroring are performed whenever the inode is written.

 - I realize extent traversal is very non optimal and could probably
   benefit from Badari's new get_block(s) stuff.  OTOH, I don't expect
   many people to use this FS for anything but interoperability, so I'm
   trying to keep it simple to start.

At present there is no locking and several required filesystem features 
are missing.  

Particularly I am interested in the following feedback:
 - is the use of sb_bread everywhere kosher or should that only be done
   for the superblock and in get_block(), and the pagecache used everywhere
   else?

 - the disk has a structure that doesn't represent a file or a directory
   (a continuation of the extent table for extremely fragmented files)
   which otherwise operates the same as an inode.  Could/should it be an 
   inode even if it wouldn't go into the dcache, i.e. just for 
   mark_inode_dirty?  Right now it has its own write path.

 - is the readdir thing legal?

 - what else looks really wrong?



             reply	other threads:[~2006-03-16  3:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-16  3:01 Bob Copeland [this message]
2006-03-16  3:01 ` [RFC][PATCH 1/7] omfs: filesystem headers Bob Copeland
2006-03-16  3:01   ` [RFC][PATCH 2/7] omfs: inode and superblock routines Bob Copeland
2006-03-16  3:01     ` [RFC][PATCH 3/7] omfs: directory routines Bob Copeland
2006-03-16  3:01       ` [RFC][PATCH 4/7] omfs: file routines Bob Copeland
2006-03-16  3:01         ` [RFC][PATCH 5/7] omfs: bitmap / block allocation routines Bob Copeland
2006-03-16  3:01           ` [RFC][PATCH 6/7] omfs: checksumming routines Bob Copeland
2006-03-16  3:01             ` [RFC][PATCH 7/7] omfs: kbuild updates Bob Copeland
2006-03-16  4:33 ` [RFC][PATCH 0/7] Optimized MPEG file system Brad Boyer
2006-03-16 18:33   ` Bob Copeland

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=11424781042886-git-send-email-me@bobcopeland.com \
    --to=me@bobcopeland.com \
    --cc=linux-fsdevel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).