Apple HFS/HFS+ File-System Support Thrives in Linux 7.1 After Near-Removal
#Infrastructure

Apple HFS/HFS+ File-System Support Thrives in Linux 7.1 After Near-Removal

Hardware Reporter
3 min read

After nearly being removed from the Linux kernel, Apple's HFS and HFS+ file-system drivers are seeing a resurgence of development with numerous fixes in Linux 7.1, proving that community maintenance can save orphaned code.

One year after Linux developers considered removing the aging Apple HFS and HFS+ file-system drivers from the kernel, these drivers are experiencing a remarkable turnaround. What was once considered orphaned code and a maintenance burden has transformed into a success story of community-driven development.

APPLE

From Orphaned to Maintained

The HFS and HFS+ drivers had been languishing in the kernel for over a decade without active maintenance. Last year, concerns about their continued presence in the mainline kernel reached a critical point, with developers seriously considering their removal. The drivers were becoming increasingly problematic, failing xfstests and generating issues caught by Syzbot, Linux's automated testing and fuzzing infrastructure.

However, in an unexpected turn of events, several developers stepped forward to take responsibility for maintaining these Apple file-system drivers. This volunteer effort has proven successful, with the HFS/HFS+ support not only surviving but thriving in recent kernel cycles.

Linux 7.1 Brings Substantial Fixes

The upcoming Linux 7.1 release showcases the fruits of this maintenance work with a comprehensive set of fixes addressing long-standing issues. The contributions from four dedicated developers have tackled problems ranging from generic test failures to potential race conditions and corruption scenarios.

Key fixes include:

  • Resolution of generic/642 and generic/523 test failures
  • Logic improvements for b-tree node creation and allocation
  • Fixes for error processing in block mapping functions
  • Addressing potential race conditions in b-tree operations
  • Validation improvements for catalog records and b-tree nodes
  • Updates to file timestamps after operations like rename and attribute changes
  • Prevention of Allocation File corruption after fsync operations

These fixes demonstrate the complexity of maintaining file-system code that must handle the intricacies of Apple's legacy file-system formats while integrating with Linux's VFS layer.

Why This Matters

The survival and improvement of HFS/HFS+ support in Linux has practical significance for users who need to access data from older Apple devices or external drives formatted with these file-systems. While Apple has moved to APFS (Apple File System) for modern macOS installations, HFS+ remains prevalent on countless external drives, Time Machine backups, and older Mac systems.

For Linux users working in mixed environments or handling data migration from Apple ecosystems, robust HFS/HFS+ support remains essential. The continued maintenance ensures these users won't lose access to their data as kernel versions progress.

A Model for Orphaned Code

The HFS/HFS+ story represents an interesting case study in open-source maintenance. Rather than simply removing code that had become burdensome, the Linux community found developers willing to invest time in keeping it functional. This approach preserves functionality for users who still need it while avoiding the technical debt of maintaining abandoned code.

As Linux 7.1 moves toward its final release, the HFS/HFS+ drivers stand as a testament to how community involvement can save seemingly doomed kernel components. The extensive list of fixes in this cycle suggests that the maintenance effort is not just keeping the code alive but actively improving its reliability and compatibility.

The full details of these changes can be found in the HFS pull request for Linux 7.1, documenting the collaborative effort that has given new life to Apple's legacy file-system support in the Linux kernel.

Comments

Loading comments...