[Ti] utility for defragmenting my internal HAD?

Mark C. Langston mark at bitshift.org
Fri Dec 20 16:36:46 PST 2002


On Fri, Dec 20, 2002 at 04:09:50PM -0800, Brett V. Gaspers wrote:
> Um...hate to say the emperor is wearing no clothes here, but isn't 
> the filesystem used by OSX AND OS9 HFS+? And this is the same 
> filesystem we've been using for several years?
> 
> Or are you talking about UFS? (which very few Mac users are or should be using)


It seems my understanding, and thus my explanation, were incomplete.
Since I mentioned inodes, the description I gave would more accurately
pertain to UFS.  However, OS X uses HFS+ (whereas OS 9 uses HFS (no
plus)).

HFS+, it appears, uses vnodes, which is similar in concept to the
Solaris vnode implementation in terms of content, but apparently
not use.  Whereas in standard BFFS-derived filesystems the inodes
or vnodes are decoupled from the data itself on the physical disk,
they are part and parcel of the data on the disk in HFS+, thus
preserving the complex file architecture of the earlier HFS,
allowing for multiple data and resource forks per file.  This
also has the implication of providing only (it seems from my
research) one vnode per file, rather than multiple inodes per
file as is common in BFFS-derived systems.  It is, however,
different from the old HFS data/resource fork dichotomy because
in HFS+, the metadata is stored in the data fork of a separate
resource file.

It also seems that this approach eliminates the possibility of
hardlinks in HFS+, which is somewhat odd given the rest of the
OS's BSD underpinnings.

What I'd really love to find is a document laying out the
data structures of HFS+ and the atomic operations, without requiring
that I go download and pore over the Darwin source.  

One thing I did find is that HFS+ does not support sparse files,
and thus there's some waste in the file storage mechanism.  


So, in answer to the question raised, "no."  We're not talking about the
same old filesystem used in OS9.  However, I'm unable to obtain
sufficient documentation right this minute to determine how HFS+ deals
with linking and unlinking of blocks on the physical disk, and how reads
occur, so I can't make a definitive statement regarding its robustness
in avoiding fragmentation issues.  I also retract the one I made
earlier; I was under the mistaken impression that HFS+ had moved farther
towards a BFFS derivative than it appears it has.


-- 
Mark C. Langston                                    Sr. Unix SysAdmin
mark at bitshift.org                                       mark at seti.org
Systems & Network Admin                                SETI Institute
http://bitshift.org                               http://www.seti.org



More information about the Titanium mailing list