[comp.os.os2] HPFS

osbornk@uther.CS.ORST.EDU (Kasey S. Osborn) (10/21/89)

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.

[CAUTION:  Writer merging with another thread:]

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.

I suppose if you knew (I don't) what the values of these manifest
constants were, a programmer could write code for it now.  The next
OS/2 Softset should have these goodies, in any case.

-Kasey

ander@pawl.rpi.edu (Michael R. Primm) (10/21/89)

    HPFS stands for High Performance File System.  Its the new file system
available for use on OS/2 V1.2...among other things, it breaks the 8.3 
character DOS file name limits, and is supposed to be significantly faster.
OS/2 is supposed to eventually evolve into having a modular file system, 
where a single system could have DOS partitions, HPFS partitions, UN*X
partitions, and so forth, all in the same system, with the internal 
differences being hidden from the applications (as I understand it).
Anyone know the nitty gritty on HPFS???
                                              --Mike Primm

todd@uhccux.uhcc.hawaii.edu (Todd Ogasawara) (10/21/89)

For various reasons, I sometimes boot PC-DOS 4.0 from floppy on occassions
and use my 55SX as a pure DOS machine.   Will I still be able to do that
(please no flaming :-) if I move to OS/2 1.2 and the HPFS?...todd
-- 
Todd Ogasawara, U. of Hawaii
UUCP:		{uunet,ucbvax,dcdwest}!ucsd!nosc!uhccux!todd
ARPA:		uhccux!todd@nosc.MIL		BITNET: todd@uhccux
INTERNET:	todd@uhccux.UHCC.HAWAII.EDU <==I'm told this rarely works

jack@csccat.UUCP (Jack Hudler) (10/22/89)

In article <5186@uhccux.uhcc.hawaii.edu> todd@uhccux.UUCP (Todd Ogasawara) writes:
>For various reasons, I sometimes boot PC-DOS 4.0 from floppy on occassions
>and use my 55SX as a pure DOS machine.   Will I still be able to do that
>(please no flaming :-) if I move to OS/2 1.2 and the HPFS?...todd

No. unless you create multiple partitions, making the boot partition DOS
Compatable and the other HPFS. This way you could keep those items that 
you run under DOS in the boot part, however you will still not be able 
to access the HPFS part from DOS40.
-- 
Jack 		Computer Support Corportion		Dallas,Texas 
Hudler		UUCP: {texsun,texbell,attctc}!csccat!jack

root@dialog.UUCP (Christian Motz) (10/24/89)

In article <13271@orstcs.CS.ORST.EDU> osbornk@uther.CS.ORST.EDU (Kasey S. Osborn) writes:
>
> [...]
>
>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.
>
>I suppose if you knew (I don't) what the values of these manifest
>constants were, a programmer could write code for it now.  The next
>OS/2 Softset should have these goodies, in any case.

Actually the whole thing works like that: There is no difference in
how files for FAT or HPFS are opened. The same call syntax is valid
for both file systems. The OS is told whether or not the application
can cope with non-8.3 filenames via a flag in the .EXE-header which
is set at link-time (Keyword "LONGNAMES" in the .DEF file).

The "correct" way to handle IFS's (Installable File Systems) under 1.2
is to query the OS for the maximum path length using DosQSystem (as
far as I recall) and reserve the amount of space for file names using
that value. For HPFS this value is 260, meaning that a fully qualified
path (including drive letter, colon, backslash and \0) can have this
length, with no individual limit for the path components. This means if
you have a file in the root directory, its name can be up to 256
characters long, whereas in a subdirectory this maximum length would
be shorter. This solution is kinda strange, but it beats the old 8.3
FAT filesystem anytime.

The only thing I do not like is that filenames are still *ALWAYS*
converted to uppercase. I have no problem with case insensitivity,
but one should at least be able to mix cases in a file name, sorta
like on the Amiga OS. Grmpf. I knew they wouldn't do it right :-)

There seems to be the rumor that only HPFS partitions support the
Extended Attributes (EA's) that exist in OS/2 1.2. Very clearly this
is not the case. EA's can also be used on FAT partitions, where they
are stored in a hidden systemfile with an "impossible" name (i.e. it
contains a blank). BTW, EA's can be accessed via DosOpen2() or
FileFindFirst2(), where a so-called "Info-Level" can be specified,
telling the OS how much we want to know about EA's.

I hope that this helped to clear up things a bit ...

--
Christian Motz           uucp: ...!uunet!mcvax!unido!nadia!dialog!root
"Trust me, I know what I'm doing!" -- Sledge Hammer         Bix: cmotz

jack@csccat.UUCP (Jack Hudler) (10/24/89)

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

jack@csccat.UUCP (Jack Hudler) (10/24/89)

In article <3341@csccat.UUCP> jack@csccat.UUCP (Jack Hudler) writes:
>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.
Oops, that's what I get for looking at QuickHelp Beta, the Flags are
from BSEDOS.H:

OPEN_FLAGS_NO_LOCALITY	0
	  _SEQUENTIAL	0x0100
	  _RANDOM	0x0200
	  _RANDOMSEQENTIAL	0x0300
	  _NO_CACHE	0x1000

-- 
Jack 		Computer Support Corportion		Dallas,Texas 
Hudler		UUCP: {texsun,texbell,attctc}!csccat!jack

pdcst@unix.cis.pitt.edu (Patrick Champion) (10/26/89)

	For GOOD technical discussions on the workings of OS/2, I find that
Microsoft's own magazine "Microsoft Systems Journal" is the best.  Right 
from the horses mouth so to speak.  Two of the people were I work subscribe
to it and I read it when I have time.  BTW, I am not associated in any way
with Microsoft.  I do like OS/2 the more that I look at it though.

	For instance, many people complain how big OS/2 is, how much memory it
eats up, how much disk space, etc.  This ain't nothin' compared to the 
enourmous monstrosity of UNIX that IBM has for the PS/2.  For a complete unix
system with ftp, uucp, cc, the standard utilities, mail, a primitive stop gap
substititue for Motif, and of course the AIX kernal, you pay an enourmous 
amount:
	Price: $7000.00  
			(this is without the Pascal + Fortran compiler, and
			the IBM mainframe interface program/library)

	Size: approx 60 Megabytes
			(70 M if you include the above compilers + program)

	Ram:  Not sure, but the Model 70 was loaded with 8 Meg.


	In the face of these requirements, OS/2 has my vote anyday.

Patrick Champion	(Of course, my views are purely my own)

tholen@uhccux.uhcc.hawaii.edu (David Tholen) (12/08/89)

I recently installed OS/2 version 1.2 on my machine, choosing to use HPFS
rather than FAT for the hard disk.  Given that HPFS uses its own cache, is
it superfluous to allocate additional memory for similar disk-related
activities with the CONFIG.SYS statements BUFFERS and DISKCACHE?  The answer
is not immediately obvious; for example, an 80486 coupled with an external
cache does seem to improve performance over and above what the internal cache
provides, but I'm not certain the analogy is appropriate in this case, given
that the functions of BUFFERS and DISKCACHE are different (that is, maybe
only one of the two is superfluous when using HPFS).  I suppose I could
learn the answer the hard way:  lots of test runs.  But rebooting that many
times doesn't sound like fun, and I'm currently running a VERY long
background job, so I won't be in a position to try for a while.  I thought
perhaps someone out there might already know the answer and could save me
some time.

The improvement in disk performance is quite noticeable, except in one or two
recent cases which I'm guessing were slowed down by the need to swap a lot
of memory to disk in order to load a big program.  That's my problem:  I have
less free memory under 1.2 than I did with 1.1, and I'm trying to find ways
to conserve.  Eliminating the memory allocated to DISKCACHE would help a lot,
but with BUFFERS=30, the memory consumption is only about 15 kbytes, so that
wouldn't help much.

Please e-mail responses to:  tholen@uhccux.uhcc.hawaii.edu
Thanks in advance.

--Dave Tholen

Christoph.Strozyk@p1217.f2.n241.z2.FIDONET.ORG (Christoph Strozyk) (01/27/90)

 Allow me to quote the letter you mailed on 21-Jan-90

 MR> RLL and ESDI drives that can look like MFM drives at the hardware
 MR> level (i.e., most of them) work fine with OS/2 -- and FAT versus
 MR> HPFS doesn't affect the compatibility issue at all, it's much more
 MR> low-level than an IFS.  I've used RLL (Western Digital WD1006) and
 MR> ESDI controllers (WD1007) without any problem.

The WD7000Fasst SCSI Controller runs also with os/2 1.1,
I'm waiting for an update to 2.0 , wait, wait, wait....

nd CS


--  
Christoph Strozyk - via FidoNet node 1:140/22
UUCP: alberta!dvinci!weyr!2!241!2.1217!Christoph.Strozyk
Internet: Christoph.Strozyk@p1217.f2.n241.z2.FIDONET.ORG
Standard Disclaimers Apply...

Peter.Fitzsimmons@p1.f628.n250.z1.FIDONET.ORG (Peter Fitzsimmons) (01/30/90)

 > EID:d714 1439abc0
 > MR>low-level than an IFS.  I've used RLL (Western Digital
 > MR>WD1006) and
 > MR>ESDI controllers (WD1007) without any problem.
 > 
 > 
 > I wonder how well non-standard (greater than 1024 cylinders) drives 
 > ouldwork under OS/2.  I hope we all don't have to go through 
 > heSpeedstor/diskmanager/etc. like with DOS.

I have a Miniscribe 3180E (150mb) that I use with the WD1007 (esdi)
controller.  The 3180E is more than 1024 cyls (1250 i think).  I
tossed the diskmanager s/w, and used the WD1007's ability to remap
the cyls by making the drive look like it has 16 heads.  (This is
the way the ps/2's work too).  My bios, and os/2, think that the
drive has 294 cyls, 16 heads and 63 sectors per track.  Performance
did not suffer at all (CoreTest 2.8 gives it an 8.4 rating).


 > I imagine that OS/2 is just going to take the drive type which is in ROM 
 > anduse it.  But if the drive doesn't match any ROM type (as in an old 
 > AT) thenI would suspect problems.

Since I used the WD1007's bios to low-level format the drive (use
G=C800:5 in debug to get the menu), and *it* knows how big the drive
really is, the "type" in your CMOS ram is not important.  Since
c=294, h=16, spt=63 is not in my bios drive tables, I simply choose
"type 1".  OS/2 and DOS will read the drive paramaters from
partition table, not from CMOS.

I am using IBM SE 1.20 on a 386/25 clone.


--  
Peter Fitzsimmons - via FidoNet node 1:140/22
UUCP: alberta!dvinci!weyr!250!628.1!Peter.Fitzsimmons
Internet: Peter.Fitzsimmons@p1.f628.n250.z1.FIDONET.ORG
Standard Disclaimers Apply...

Steve.Lesner@f261.n141.z1.FIDONET.ORG (Steve Lesner) (02/01/90)

For you all that want to use > 1024 cylinders, do buy a WD-1007A or any other 
controller than supports low level formatting in Debug via translation.


--  
Steve Lesner - via FidoNet node 1:140/22
UUCP: alberta!dvinci!weyr!141!261!Steve.Lesner
Internet: Steve.Lesner@f261.n141.z1.FIDONET.ORG
Standard Disclaimers Apply...

root@dialog.UUCP (Christian Motz) (02/02/90)

In article <176.25C191B9@weyr.FIDONET.ORG> Koos.Van.den.hout@p11012.f101.n500.z2.FIDONET.ORG (Koos Van.den.hout) writes:
>
> 
> > Which leads me to "extended attributes".  I have picked up a couple bits
> > about  these, but need to know more before I can see any use for them.
> 
>The BYTE of Januari 1990 contains an interesting article on HPFS and extended 
>attributes. According to the writer, the Februari issue will contain a more 
>'technical' story about HPFS and extended attributes.

Why do people talk about Extended Attributes only in conjunction  with
HPFS? EA's are a feature of OS/2 1. 2,  not  of  HPFS  in  particular,
meaning that you will be  able  to  use  Extended  Attributes  on  FAT
partitions also.
   The Byte article mentioned above (January 1990)  does  not  contain
any information that wasn't already on this newsgroup some  time  ago.
As far as technical details of HPFS go, I can  recommend  the  article
recently published in the "IBM Personal Systems Developer" magazine.

--
Christian Motz           uucp: ...!uunet!mcsun!unido!nadia!dialog!root
"Trust me, I know what I'm doing!" -- Sledge Hammer         Bix: cmotz

feustel@well.sf.ca.us (David Alan Feustel) (02/09/90)

Steve.Lesner@f261.n141.z1.FIDONET.ORG (Steve Lesner) writes:

>For you all that want to use > 1024 cylinders, do buy a WD-1007A or any other 
>controller than supports low level formatting in Debug via translation.

Be aware that the WD-1007a works only with 10 megabit/second ESDI
drives and then only with drives having 34 or fewer sectors/track i
The WD-1007V-SEx works with 15 megabit/second drives having up to
53(4?) sectors/track. The v version has an Intel 188 and a 32k cache.