LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Bob Copeland <me@bobcopeland.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 1/7] omfs: define filesystem structures
Date: Fri, 28 Mar 2008 19:18:33 -0400	[thread overview]
Message-ID: <20080328231833.GA16515@hash.localnet> (raw)
In-Reply-To: <20080328201940.GA3974@ucw.cz>

On Fri, Mar 28, 2008 at 09:19:40PM +0100, Pavel Machek wrote:
> On Wed 2008-03-26 20:45:54, Bob Copeland wrote:
> > OMFS is a proprietary filesystem created for the ReplayTV and
> > also used by the Rio Karma.  It uses hash tables with unordered,
> > unbounded lists in each bucket for directories, extents for
> 
> Why did they create such beast?

Heh, I wish I knew.  Good old NIH.  There were so many "interesting"
decisions here, like requiring seeks all over the place for dir
traversal, picking a hash function that has collisions in almost every
bucket even when the table is half empty, wasting large amounts of space
by not even using 3/4s of certain blocks -- it's hard to pick a favorite.

Oh, on ReplayTV 4/5xxx they also byte-swapped the block layer such that
every 4 bytes were written backwards (even data).  So a be64 would
be written out as 'le32_high le32_low'.  This patch doesn't support that 
brain damage, but I did cook up a bswap dm target to test with one of 
those disk images.

> > +struct omfs_header {
> > +	__be64 h_self;
> > +	__be32 h_body_size;
> > +	__be16 h_crc;
> > +	char h_fill1[2];
> > +	u8 h_version;
> > +	char h_type;
> > +	u8 h_magic;
> > +	u8 h_check_xor;
> > +	__be32 h_fill2;
> > +};
> 
> attribute packed or something? Some strange machine (alpha?) may
> decide to align u8s at 32bit boundaries...

Thanks, I guess this applies for all the on disk structs.

-- 
Bob Copeland %% www.bobcopeland.com 


  reply	other threads:[~2008-03-28 23:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-27  0:45 Bob Copeland
2008-03-28 20:19 ` Pavel Machek
2008-03-28 23:18   ` Bob Copeland [this message]
2008-03-29  3:15     ` Arnd Bergmann
2008-03-29 15:29       ` Jamie Lokier
2008-03-30  3:16         ` Bob Copeland
2008-04-12 22:58 Bob Copeland
2008-04-13  8:03 ` Christoph Hellwig

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=20080328231833.GA16515@hash.localnet \
    --to=me@bobcopeland.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --subject='Re: [PATCH 1/7] omfs: define filesystem structures' \
    /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

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).