Sat, 2007 Jul 28
File System Ideas
I’ll start with a disclaimer: I know very, very little about file system design or implementation.
Nevertheless, I have been pondering it some lately and have some ideas of how I might like to see a file system implemented. So, this is arm-chair designing, and should not be taken as an informed discussion of the subject (however, I’d enjoy comments, including informed ones). In particular, I want to talk about what I’m off-the-cuff terming a “Convenience Operations Aware File System”.
In this model, the FS is aware of things like compression, encryption and versioning (i.e. “convenience operations” on a node that do not affect the contents of the node). When a node is saved, the following things could happen, in this suggested order:
- Versioning - an rdiff is done on the node. In database terms, the current node is saved in the primary table with full content. The primary table has a has many relationship with a versions table that saves rdiffs from subsequent versions. Meta-data could indicate that only manual deletes of previous versions could take place or that they could be deleted based on other circumstances (space, time, etc).
- Compression - A library or system call returns the compressed content. Ideally, this call could take as arguments the specific compression type and any options. The compression settings would be part of the meta-data for the node; rather than a zip file, there would be a node that is zip compressed. If the node is versioned, the content would be compressed, and also the rdiffs (probably all together) would be compressed. Hence the data itself would be rdiff’ed rather than the compressed data. If the compression information is changed, the versioned files will be re-/de-compressed as needed.
- Encryption - Same idea as compression.
Possibly, folders would have the potential to be treated as a single node that contains a child file system, so that a folder could be subject to the above, for operations such as tar.
File operations, such as copy/pastes could retain these “convenience operations” or not. When copying to another file system, they could convert into a more conventional format, say a zipped file, without version.
So, there’s that thought.
