Article View: comp.os.os2
Article #77Re: HPFS
From: Jack Hudler
Date: Mon, 23 Oct 1989 20:59
Date: Mon, 23 Oct 1989 20:59
78 lines
4467 bytes
4467 bytes
In article <13271@orstcs.CS.ORST.EDU> osbornk@mist.CS.ORST.EDU (Kasey S. Osborn) writes:
>In article <DKB.89Oct20175149@anquetil.cs.brown.edu> dkb@cs.brown.edu
>(Dilip Barman) writes:
>>What's HPFS??
>
>HPFS stands for High Performance File System. It is a replacement
>for the FAT system. Before rev. 1.2, OS/2 had still been using
>DOS's file system (FAT). HPFS looks a lot like FAT but has extended
>attributes and extended names.
>
Shorten version of an article in the Microsoft Systems Journal, Sept 1989
by Ray Duncan. I thought it might be helpful to some.
HPFS volumes use a sector size of 512 bytes, and can handle up to
2199 Gb (2^32 sectors). The file system is a complete rewrite from
the FAT system and resembles it's very little, if any thing it resembles
unix file structure, but even there very little. One difference is that
disk space is managed on a sector basis rather than a cluster basis,
directorys are B-Trees, on the fly bad sector repair using pool of
sectors for this purpose called the hotfix pool, and more efficent
caching methods.
The format of an HPFS volume; sectors 0-15 are the boot sectors, sector
16 is the Super Block and 17 if the Spare Block. The superblock contains
pointer to the free space bitmaps, root directory, directory block band,
and bad block list.
The structure uses what are called Fnodes, this ocupies one sector and
contians the pointer to the file along with it's size, times, first 15
characters of the file name, allocation structure (this is the only
resemblence I can find to FAT), and other attributes. The HPFS views a
file as collection of one or more runs or extents of one or more
contiguous sectors.The Fnode can store information for eight runs of
sectors of up to 16mb each. If the file is too large or too fragmented
for the Fnode and consist of more than 8 runs. The Fnode's allocation
structure becomes the root for a B+ Tree. With this method the effective
limit on file size is 2Gb (32 signed offest pointer for Seek Function is
the reason for this limit).
Directories like files are anchored on Fnodes, a pointer to the root dir
is found in the super block. The file system attempts to allocate directory
blocks in the directory band, which is located at or near the seek center
of the disk. One the directory band is full further space for the directories
is taken from avaliable space.
A directory entry contains the name,time,date,size,attribute,usage count,
Fnode pointer to file, and it's Btree pointer in the directory (this is
where HPFS really shines).
HPFS Prime Directive, is to assign consecutive sectors to files whenever
posiable. To do this HPFS scatters newly created files across the disk
and pre-allocate 4Kb of space on creation and free the excess when it's
closed.
HPFS must be properly shutdown, and the File system contains a stick bit
or dirty bit, if the system is shutdown and the dirty bit is set, then
the system will not reboot, until chkdsk is run. (hmm sounds like it
needs a 'fsck -y' at boot time)
So for all of those that are writing disk utilites....
>I understand that OS/2 1.2 allows the DosOpen function to specify
>additional flags for the fsOpenMode parameter. This feature is
>available only on HPFS partitions. These new flags are advisory -
>they inform the operating system of the programs intent. They advise
>the file system of whether the program will access a file randomly or
>sequentially, for example. This allows the cache system to make
>informed decisions - extending the efficiency of HPFS. I'm missing
>FAT already.
There are some new flags OPEN_FLAGS_CACHE,OPEN_FLAGS_LOCAL_UNK,
OPEN_FLAGS_LOCAL_RANDOM,OPEN_FLAGS_LOCAL_SEQ, and OPEN_FLAGS_LOCAL.
CACHE flags controls caching, this is the write-through flag.
LOCAL_xxx are self-expanatory.
--
Jack Computer Support Corportion Dallas,Texas
Hudler UUCP: {texsun,texbell,attctc}!csccat!jack
Technical Details
Message-ID:
<3341@csccat.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!gem.mps.ohio-state.edu!lavaca.uh.edu!uhnix1!texbell!vector!egsner!csccat!jackReferences:
<DKB.89Oct20175149@anquetil.cs.brown.edu> <13271@orstcs.CS.ORST.EDU>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!gem.mps.ohio-state.edu!lavaca.uh.edu!uhnix1!texbell!vector!egsner!csccat!jack From: jack@csccat.UUCP (Jack Hudler) Newsgroups: comp.os.os2 Subject: Re: HPFS Message-ID: <3341@csccat.UUCP> Date: 23 Oct 89 20:59:56 GMT References: <DKB.89Oct20175149@anquetil.cs.brown.edu> <13271@orstcs.CS.ORST.EDU> Reply-To: jack@csccat.UUCP (Jack Hudler) Organization: Computer Support Corporation. Dallas,Texas Lines: 78