ExtractStream + new SVR2000 FIXED!

jeremyjgordonhome jgordon at s...
Tue, 08 Jan 2002 21:14:33 -0000


Cool! I remember the filenames mfs.c and mfs.h from poking around 
samba.org when I first started getting my TivoNet up in December (and 
didn't know WTF "mfs" was), but I had totally forgot about them! 
Can't wait to play around with this stuff later tonight...So I wonder 
how close MFS is to a traditional INODE based filesystem like Linux 
FS.

PS. Edmond, I could maybe FTP you a dump of my /usr/local/tivo 
GCC/bintools directory which has all the /usr/local/tivo/{include, 
lib, bin} for the dev environment. All you would have to do is un-
extract, make sure /usr/local/tivo/bin is the first thing in your 
path for your "tivo compile shell" and then tivo's GCC is invoked 
instead of your normal GCC. 

I wish I could remember how to pre-fix GCC during the build process 
to actually end up with:

/usr/local/tivo/bin/tivo-gcc and
/usr/local/tivo/bin/tivo-as and
/usr/local/tivo/bin/tivo-ld etc, etc, etc

It's like 200 meg or something like that, maybe someday I could strip 
it down/clean it up a bit for a general consumption binary post.

Regards,

Jeremy

--- In ExtractStream@y..., "rwaldin" <rwaldin@y...> wrote:
> --- In ExtractStream@y..., "Edmond E. Shwayri" <eshwayri@n...> 
wrote:
> > I have figured out the problem. Here are my calculations based on
> -w's 
> > output :
> 
> Thanks for the feedback. Your results match what I suspect has been
> the underlying problem with ExtractStreams FSID calculation. It
> turns out that using masks of 0x3ffff and 0xfffff are only
> approximations of the real solution. The 0x3ffff mask works best in
> many situations on the SA TiVos and the 0xfffff mask works best on
> many DTiVos.
> 
> The real solution seems to be in the metadata in the MFS partition
> "headers". I found these structures:
> 
> http://pserver.samba.org/cgi-bin/cvsweb/tivo/vplay/mfs.h?rev=1.36
> 
> which along with some code:
> 
> http://pserver.samba.org/cgi-bin/cvsweb/tivo/vplay/mfs.c?rev=1.41
> 
> that uses them. With what I've learned already, I can tell that the
> FSID calculation can be done precisely on all systems. 
> 
> I'd like to update the experimental version to do just that, and 
have
> you all retest your systems and see if we have it right. That 
should
> take me a day or two.
> 
> For those of you who would like to know more now, the real solution
> appears to be something like:
> 
> fsidHash = fsid * 67289 % totalSectorsOnAllInodeZones;
> virtualSector = fsidHash * 2;
> i = 0;
> while(zone[i].type == INODE_ZONE && zone[i].sectors <= 
virtualSector)
> {
> virtualSector -= zone[i].sectors;
> }
> sector = virtualSector + zone[i].start;
> partition = i;
> 
> Turns out this works in both the SA and DTiVo cases, i.e. it's the
> Grand Unified Theory of TiVo MFS. But in order to do this, you need
> to have the list of zones and zone properties, and that's all found
> in the MFS "headers". Many thanks to tridge for showing the way! I
> may just end up using his code directly since it already does what 
we
> need. Is there a reason why ExtractStream doesn't use his code?
> 
> -Ray