[Coco] RBF File System Questions
Bob Devries
devries.bob at gmail.com
Mon May 28 17:54:30 EDT 2007
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. 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.
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_migration_HM_mini_pcmag_0507
>
>
--------------------------------------------------------------------------------
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco
>
More information about the Coco
mailing list