2009/7/29 Christian Masloch <[email protected]>:
>> Which aspects of SFT changed and how? Are there potential
>> performance issues because we no longer can cache certain
>> data in extra fields of fnodes?
>
> It seems to me that the fnode (as defined in fnode.h) doesn't save any
> information that isn't contained in the SFT, except the new file dates and
> times (in the directory entry) which are accessed with a filename instead
> of a SFT; so they're not required in the SFT. Note that the directory
> entry's cluster and index into cluster (as found in the fnode) can be
> computed with some shifting from the entry's sector and index into sector
> (as found in the SFT) when the sector size, cluster size and the sector of
> the first cluster is available (all found in a valid DPB or EDPB).
Before I eliminated the far fnodes I made them compatible with SFTs.
There are no performance issues; the directory entry now needs to be
read, updated and written for a file close, instead of just copied
from the fnode, but since the sector needs to be read anyway it
doesn't change performance.
An fnode now is defined like this:
struct f_node {
UWORD f_flags; /* file flags */
dmatch *f_dmp; /* this file's dir match */
struct dirent f_dir; /* this file's dir entry image */
ULONG f_dirsector; /* the sector containing dir entry*/
UBYTE f_diridx; /* offset/32 of dir entry in sec*/
/* when dir is not root */
struct dpb FAR *f_dpb; /* the block device for file */
ULONG f_offset; /* byte offset for next op */
CLUSTER f_cluster_offset; /* relative cluster number within file */
CLUSTER f_cluster; /* the cluster we are at */
UBYTE f_sft_idx; /* corresponding SFT index */
};
Some fields moved to f_dmp -- there two directory match structures in
the SDA (even documented in RBIL), one for every fnode. I have some
patches to move the f_dir directory entries to the RBIL SDA locations
too but I'll wait with those until after release. Once dos_close() and
rwblock() (for read and write) use SFT entries directly, it's actually
more appropriate to call an fnode a dirnode, since it only pertains to
directory operations.
Right now however, directory and file operations share map_cluster()
which takes an fnode pointer, so it's not a trivial change.
Originally, files and directories seem to have used the same
read/write code but directories are too special in DOS so they were
split.
>>> * Fixed Int21/AX=4409 for drives from device drivers.
>>
>> What was wrong?
>
> I'm interested too.
ioctl.c had:
CharReqHdr.r_unit = dpbp->dpb_subunit;
(changed from dpbp->dpb_unit in
r1115 | perditionc | 2005-02-24 15:35:48 -0500 (Thu, 24 Feb 2005) | 2 lines
from Eric (similar already in dev), set driver request field with
subunit number)
but after that it was used in:
case 0x09:
{
struct cds FAR *cdsp = get_cds(CharReqHdr.r_unit);
so you also now got the CDS from the subunit. That's ok for built-in
devices but not for loaded devices.
I changed the get_cds call to use BL.
Bart
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Freedos-kernel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel