bug-parted
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: New HFS Patch 12.5 fix a dangerous bug


From: Stewart Smith
Subject: Re: New HFS Patch 12.5 fix a dangerous bug
Date: Thu, 9 Sep 2004 15:07:53 +1000
User-agent: Mutt/1.5.6+20040818i

On Thu, Sep 09, 2004 at 02:54:29AM +0200, K.G. wrote:
> The only thing lacking is a complete fs consistency checking tool, but I
> can still do very usefull checks without it.
> hpfsck from hfsplusutils does only some basic checks in the volume header.
> I could port the fsck_hfs tool from apple or write the check fonction for 
> Parted.

The OSX fsck is fairly limited as well... but may be good to port (if
someone hasn't already... i seem to recall something.. somewhere...).

> I don't think there is a defragmenter in Os X. I think there is an automatic
> defragmenter in kernel space, but if I remember well it only reduces internal
> fragmentation so this won't help. Anyway I'll add a cache that will let find
> the descriptor of any particular extent in the FS, that will speed things up
> (should have done it from the very begining but the very begining was a quick
> hack to let me install linux in few days on a PPC :p ).

There is no Apple provided defragmenter in OSX. Although, on open(), if
a file is less than 20MB and has more than 8 fragments, the FS code will
try and defragment it. It's pretty easy to see the logic behind this in
the darwin code. I'll try and find the exact location if you want.

> > > Of course I'll also try to write working automatic regression tests for 
> > > HFS
> > > in next versions. But I must switch to a 2.6 kernel because of HFS bugs 
> > > in 2.4
> > > and I still haven't done it for other reasons.
> > 
> > You might find user-mode-linux helpful.

Mac-On-Linux may also be good - as you can then run the OSX utils on the
same partition (without rebooting).

> > > Also there is a part of my code that has never been tested (attributes
> > > file) because I could never find a FS using that feature (which in
> > > anyway not completly defined in Apple specs, and I doubt there is one
> > > computer in the world with that feature anyway).

Although Apple does define what you should do with attributes file
entries if you don't understand them. Following those rules should be
fine. My guess is that this may be used for some of the stuff coming in
tiger.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]