New Version of HFSDebug
I found some time today to make a certain feature of HFSDebug work on Leopard. The new version is available for download here. The new version should run on both Leopard and Tiger, but there are no visible changes whatsoever for Tiger users.
If you use HFSDebug, you might have realized that the -m option doesn’t work on Leopard any more. This option is used to retrieve and display the in-kernel mount data for a currently mounted HFS+ volume. This is what you would see if you ran the now deprecated version 2.56 of HFSDebug on Leopard:
$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.5.1
BuildVersion: 9B18
$ sudo hfsdebug
populateHFSPlusMount(222): failed to retrieve symbol information.
hfsdebug: failed to locate mount data (perhaps the volume is not mounted)
$
The updated version should work correctly as follows. As you can see, if you did care about this information, this is a rather useful feature that needed fixing for Leopard.
$ sudo ./hfsdebug -m
Volume name = Macintosh HD (volfs_id=234881026)
block device number = { major=14, minor=2 }
HFS+ flags = 000...0000000000000010001100
+ HFS_WRITEABLE_MEDIA
+ HFS_CLEANED_ORPHANS
+ HFS_METADATA_ZONE
default owner = { uid=99, gid=99 }
directory protection bits mask = 755
file protection bits mask = 755
# Key Data Structures
struct mount * = 0x41ebb90
block device vnode = 0x4333f40
Extents file vnode = 0x4333eb0
Catalog file vnode = 0x4333e20
Allocation file vnode = 0x4333d90
Attributes file vnode = 0x4333d00
# Statistics
physical block size = 512
physical block count = 0x12975e60
alternate volume header location = 0x12975e5e
size of a buffer cache buffer = 4096
number of files in file system = 1047391
number of directories in file system = 156694
free allocation blocks = 0x1967df5
start block for next allocation search = 0xdfd404
next unused catalog node ID = 2011304
file system write count = 84130726
free block reserve = 64000
blocks on loan for delayed allocations = 0
encodings in use = 00...010000000000000000001001011
# Notification Variables
notification conditions bits = 0
freespace warning limit = 64000
freespace desired level = 96000
# Times
last mounted time = Sun Dec 30 21:36:21 2007
last mounted modification time = Sun Dec 30 21:35:51 2007
last modification time = Sun Dec 30 22:08:31 2007
cache of largest known free extents =
# Journal
journal for this volume = 0x4338f00
vnode for journal device = 0x4333f40
start block of journal = 0x4a8
journal size = 16777216
journal file ID = 16
journal info block file ID = 17
# Hot File Clustering
clustering stage = HFC_RECORDING
recording period start time = Thu Dec 20 07:41:40 2007
recording period stop time = Wed Jan 2 13:17:52 2008
opaque recording data = 0x24189004
maximum files to track = 1000
vnode of Hot Files B-Tree = 0x0
# Metadata Zone
metadata zone start block = 0x1
metadata zone end block = 0x67fff
hotfile start block = 0x45be2
hotfile end block = 0x67fff
hotfile free blocks = 0x20491
hotfile maximum blocks = 0x2241e
overflow maximum blocks = 0x800
catalog maximum blocks = 0x43f3b
# Other
maximum inline attribute size = 3802