🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #4469

Re: when is a block not a block?

#4469
From: Randell Jesup
Date: Fri, 20 Jul 1990 21:34
36 lines
2357 bytes
In article <3fco02lsb9LE01@amdahl.uts.amdahl.com> ked01@juts.ccc.amdahl.com (Kim DeVaughn) writes:
>> 	Actually, it looks to be counting extension blocks as well as data
>> blocks, but not header blocks (since you can have them while having no
>> data at all).  One could argue this is more accurate, since those extension
>> blocks are used in storing the data, though they don't contain data
>> themselves.
>
>Yeah ... that is what it looks to be ... but I've been burned by a "pretty
>face" before, too :-)
>
>Are you saying this is now the documented behavior for the fib_NumBlocks
>entry (for the FFS), or is it still better to compute them yourself from
>fib_Size, so as not to break in future releases?

	Computing it yourself is never really safe.  It depends on how the
FS works internally.  Take what it gives you, with the understanding that
this really is only an internal measure of storage to the filesystem.  On some
filesystems I can imagine (easily), the number of blocks a file takes may
depend on fragmentation.  Certainly the number of blocks can and will
vary from filesystem to filesystem for a given file.

	I advise against writing code that uses blocks for anything more than
user informational display or hints.

>OK, I won't (yet, anyway :-) ) ... but can you say if the hash-table size
>is still fixed at "72", and if it isn't fixed, how one finds out that
>info (the field in the root block struct ?)

	I don't know, that's Steve's baby.  The various blocks have always
been defined as <size - X> for things towards the end, with the table in
the middle.

-- 
Randell Jesup, Keeper of AmigaDos, Commodore Engineering.
{uunet|rutgers}!cbmvax!jesup, jesup@cbmvax.cbm.commodore.com  BIX: rjesup  
Common phrase heard at Amiga Devcon '89: "It's in there!"
Technical Details
Message-ID: <13342@cbmvax.commodore.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!apple!oliveb!amiga!cbmvax!jesup
References: <6498.269a4527@vax1.tcd.ie> <648H02l0b8KM01@amdahl.uts.amdahl.com> <13237@cbmvax.commodore.com> <3fco02lsb9LE01@amdahl.uts.amdahl.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!apple!oliveb!amiga!cbmvax!jesup
From: jesup@cbmvax.commodore.com (Randell Jesup)
Newsgroups: comp.sys.amiga.tech
Subject: Re: when is a block not a block?
Message-ID: <13342@cbmvax.commodore.com>
Date: 20 Jul 90 21:34:08 GMT
References: <6498.269a4527@vax1.tcd.ie> <648H02l0b8KM01@amdahl.uts.amdahl.com> <13237@cbmvax.commodore.com> <3fco02lsb9LE01@amdahl.uts.amdahl.com>
Reply-To: jesup@cbmvax (Randell Jesup)
Organization: Commodore, West Chester, PA
Lines: 36