Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#10 Directory link count 1 less than it should be?

open
nobody
None
5
2007-02-19
2007-02-19
Conrad Hughes
No

Directories under HFS+ only seem to have an initial link count of 1. Usually directories on Linux filesystems have two links to them when first created - from self (".") and parent dir. A number of unix utilities (including find and some programs in nmh) use this as a source of optimisation since a directory with a link count of two can't have any subdirectories. This optimisation doesn't work under HFS+, and in fact the tools can malfunction badly because of the lower-than-expected count.

Have to admit that I've taken my sweet time reporting this, and can only say somewhat vaguely that it manifested under kernel 2.6 on a Debian system last year, connected to a USB drive that had been formated with case-sensitive HFS+ on an Intel Mac Mini, so you may well have noticed or fixed this since. Still, I hope this information's of some use to you.

Thanks for writing the module though --- I found it very useful while migrating a chunk of data between my Mac and Linux box...
Conrad

Discussion