[Coco] RBF File System Questions
Gene Heskett
gene.heskett at verizon.net
Mon May 28 23:53:42 EDT 2007
On Monday 28 May 2007, Bob Devries wrote:
>Darren,
>
>The directory entry on an OS9 disk points to the file descriptor sector of
>that file. In the directory, the first 29 bytes of the 32 for an entry are
>for the filename, and the last 3 are a pointer to the sector where the file
>descriptor lives.
>
>The file descriptor has space in it for 35 "chunks" of the file.
Clarification, Bob. There can be up to 48 FD.SEG entries.
>These
>pointers are in the format of three bytes for a pointer to the sector, and
>two bytes for the number of sectors. This is referred to as FD.SEG (page 5-4
>in Technical reference). There will not be more than one entry in FD.SEG,
>unless the disk is severely fragmented, or the file has been opened, written
>to closed, etc a large number of separate times.
>
>When a file is created and the first data is written to it, that section of
>the file descriptor will have data pointing to at least 1 sector, depending
>I believe, on the setting of PD.SAS. Usually the value of PD.SAS is 8, but
>it may be more or less depending on the installation. This value, I think,
>refers to allocated CLUSTERS, which on a normal disk is 1 sector, but may be
>more on very large hard disks.
One way to help the fragmentation problem that I'm fond of, is to reset that
default PD.SAS from 8, to as high as FF(hex), forcing the filesystem to
locate and allocate as many as 255 sectors in one swell foop. The file may
not actually use that many, and the leftovers will be returned to the free
space pool when the file is finished and closed. This is far faster for
large file operations than having it open the default, claim 8 clusters,
write them, find its out of disk space and then have to do that again 33 more
times. And yes, that is in clusters, which may not be a 1, and could be any
power of 2 that will fit in a one byte definition. Of course, when the disk
is nearly full, then that particular scheme of using a large value for FD.SAS
has to be scaled down. One can use the free command to determine the ideal
size in that event.
In that regard, dmode is your friend.
>If a file is shorter than one cluster, then the rest of the cluster is
>wasted.
>
>--
>Regards, Bob Devries, Dalby, Queensland, Australia
>
>Isaiah 50:4 The sovereign Lord has given me
>the capacity to be his spokesman,
>so that I know how to help the weary.
>
>website: http://www.home.gil.com.au/~bdevasl
>my blog: http://bdevries.invigorated.org/
>
>----- Original Message -----
>From: "Darren A." <darccml at hotmail.com>
>To: <coco at maltedmedia.com>
>Sent: Tuesday, May 29, 2007 4:05 AM
>Subject: [Coco] RBF File System Questions
>
>> Hi all. Are there any RBF file system experts on this list who can help
>> me?
>> In particular, I need to know more about how file descriptors are
>> allocated.
>> I read the chapter from the OS 9 Programmer's Manual, but it doesn't go
>> into
>> enough detail.
>>
>> The Programmer's Manual says that the first sector of every file is a file
>> descriptor. It also says that when a file is first created, it has no
>> segments allocated. This seems to imply that the file descriptor is not
>> contained in one of the file's segments. Are the descriptors just
>> allocated
>> as independent sectors that are not contained in any file, including a
>> directory file?
>>
>> Also, when the cluster size of a volume is more than one sector, is the
>> size
>> of a file descriptor still a single sector or is it the same as the
>> cluster
>> size? If it's still just a single sector, is the extra space in the
>> cluster
>> wasted, or is the file system able to allocate multiple file descriptors
>> in
>> a single cluster?
>>
>> Darren
>>
>> _________________________________________________________________
>> PC Magazine's 2007 editors' choice for best Web mail-award-winning Windows
>> Live Hotmail.
>> http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migrat
>>ion_HM_mini_pcmag_0507
>
>----------------------------------------------------------------------------
>----
>
>> --
>> Coco mailing list
>> Coco at maltedmedia.com
>> http://five.pairlist.net/mailman/listinfo/coco
>
>--
>Coco mailing list
>Coco at maltedmedia.com
>http://five.pairlist.net/mailman/listinfo/coco
--
Cheers, Gene
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Anything anybody can say about America is true.
-- Emmett Grogan
More information about the Coco
mailing list