Subject: Re: as long as we're hitting FFS...
To: Bill Studenmund <email@example.com>
From: Julian Assange <firstname.lastname@example.org>
Date: 03/26/1999 11:37:47
Bill Studenmund <email@example.com> writes:
> A type:value chain strikes me as just way too space inefficient and time
> inefficient a thing to stick in the inode, especially for essentials of
> how the fs accesses the node. We don't need that kind of flexability, and
> the overhead is too expensive.
find_by_type(char type, char *data, int len)
for (n=0; p[n]!=IDATA_TYPE_END && n<len; n+=p[n+1]+2)
if (p[n] == type)
That (miniscule!) loop normaly executes precisely once. For real-life
code you will also need an IDATA_TYPE_NOOP in order to pad some types
to 32 bit boundaries.