ZFS, HFS+, resource forks, CIFS, NTFS ADS data streams, VFS, VFSFT_XVATTR, extended attributes
Posted by Graham Perrin on 9 June 2007
I’m necessarily thinking about ZFS and Mac OS X 10.5 before Apple’s Worlwide Developers Conference.
(10.5 aside: I’m dreaming of MacFUSE + ZFS + MacFusion for Mac OS X 10.4.)
Amongst the ZFS-related comments under Sun’s New Modular Blade Servers:
Case-insensitive ZFS support was fast-tracked and approved May 9. It’s not currently integrated into opensolaris, so it would appear that this is all about Apple and replacing HFS/HFS+.
If case-insensitive is about OSX then why does the mail folder on that talk about being for CIFS?
Consider two sets of information:
1) ZFS case-insensitive support — PSARC 2007/244 (Approved FastTrack) — onepager
This fast-track was spun off of the CIFS Service (PSARC 2006/715) case along with:
- PSARC 2007/218 caller_context_t in all VOPs
- PSARC 2007/227 VFS Feature Registration and ACL on Create
Although each of these changes are part of the bigger picture…
2) VFS Feature Registration and ACL on Create case materials
… The challenge is to support new, optional file system features without requiring all file systems (especially unbundled file systems) to support or even be aware of the new features.
The solution is to provide a VFS Feature Registration mechanism. At mount time, a file system can register the set of features that it supports. A set of interfaces to register and query features is provided. The feature information is stored in the vfs which makes it file system independent. Savvy callers can query the features of a file system to make informed decisions on which behavior to request. Finally, the feature registration mechanism allows decisions to be made at the VOP/fop layer so that requests for features not supported by the mounted file system can be rejected. …
Several VFS Features will be defined for the initial implementation.
… The following are additional features that will be fully described in subsequent fast-tracks.
DISCLAIMER: The names below are subject to change.
- VFSFT_XVATTR – File system (FS) supports extensible vattr structure
- VFSFT_CASEINSENSITIVE – FS supports case insensitive behavior
- VFSFT_NOCASESENSITIVE – FS does not support case-sensitive behavior
- VFSFT_DIRENTFLAGS – FS supports flags on directory entries
USE OF VFS FEATURE REGISTRATION INTERFACES
“VFS features” are intended to represent optional features that mounted file systems may support. Examples of optional features are listed in the “VFS FEATURES” section (above). Not all file system types support all features. (Initially, only ZFS will support these features.) …
It’s not all about CIFS or HFS+ or ZFS or OpenSolaris or Sun.
It is partially about optional features that mounted file systems may support.
- CIFS supports extended attributes — non-file system attributes
- other protocols/systems that support extended attributes (or multiple forks or multiple/alternate data streams (ADS)) include AFP, HFS, HFS+ and NTFS.
As many people are unaware of resource forks and the like in systems other than HFS+ I’ll offer three examples:
- How to use NTFS Alternate Data Streams
- FAQ: Alternate Data Streams in NTFS
- The Hack FAQ point 25.28 mentions hacking of resource fork files in a namespace on Netware.
ZFS is already fork-capable
According to that Wikipedia article: in a Solaris context,
- file forks are known as extended attributes
Christopher R. Hertel describes other contexts — CIFS, Samba and Windows — in which:
- extended attributes (EAs) and alternate streams are similar, but different.
Last but not least, I am advised that on Solaris:
- it is no problem to have a raw device in a zpool
and if the same will be true for Mac OS X 10.5 and ZFS, then I guess it will be up to us (Mac uses) to do whatever we wish with raw devices within a zpool.
The communities’ diverse interpretations of technologies, layers and expressions will inevitably lead to confusion at some point. Be prepared!
WWDC should help to clarify many misconceptions.