TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: JONATHAN DE BOYNE POLLARD
from: MIKE RUSKAI
date: 1999-10-24 11:44:00
subject: HPFS freespace bmp list

Some senseless babbling from Jonathan De Boyne Pollard to Mike Ruskai
on 10-22-99  08:35 about HPFS freespace bmp list...

 MR> The problem is that I'm not certain how to handle drives larger than
 MR> 4GB. The freespace bitmap list is four sectors long, which allows for
 MR> 512 data bands (about 4GB).  Also in the HPFS SuperBlock is a pointer
 MR> to a spare freespace bitmap list.  What's not there is the length of
 MR> this spare list. If it's only four sectors, like the primary list,
 MR> then HPFS dies at 8GB, without another list.

 JDBP> The length of the bitmap list is proportional to the drive size.  On
 JDBP> my 7.82GiB HPFS volume the bitmap list is 8 sectors long, and contains
 JDBP> pointers to 1024 bitmaps (of which 1002 are used).  My educated guess
 JDBP> is that the length of the bitmap list is calculated by the HPFS driver
 JDBP> from the overall volume size. 
 JDBP> The spare list sector in the superblock is zero, by the way.

I recently found that out from the author of a program called DFSEE.  I
guess it was easier for them to just extend the bitmap list than to use the
spare list (which I guess is never used).  The list is apparently expanded
four sectors at a time, according to drive needs.  The following bit of C
arithmetic calculates how many sectors to read:

bmpListSectCount=((((totalSectors>>14)+2)*4)/sectorSize)+1;

The actual count will, of course, be the next multiple of four, but the
above will get all of the bitmap locations.  If an accurate count is
needed, the following (probably overdone) snip will do it, run after the
above:

bmpListSectCount=bmpListSectCount%4==0?bmpListSectCount:(bmpListSectCount/4+1)*
4;

So far, it seems that the 4096-sector discrepancy is universal, except I
haven't yet received results from a HPFS386 system, because it seems
HPFS386 doesn't understand sector mode.

Mike Ruskai
thannymeister@yahoo.com


... Alzheimer's advantage - new friends every day.

___ Blue Wave/QWK v2.20
--- Platinum Xpress/Win/Wildcat5! v3.0pr2
292/854
* Origin: FIDO QWK MAIL & MORE! WWW.DOCSPLACE.ORG (1:3603/140)

SOURCE: echoes via The OS/2 BBS

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.