Time for smarter hard disks?
[work in progress]
Should hard disks get smarter and start handling some filesystem tasks by themselves?
This idea has been floating around in my mind for a while.
Disks know their physical layout and could probably
allocate disk space more efficiently than any filesystem,
not to mention that doing so would offload a significant part of what
the filesystem code does from the main CPU.
The basic idea goes like this:
- Disks would think in terms of “objects” that directly represent files(1).
They wouldn't handle human-friendly file names and file hierarchies:
that task would be left to an operating system(2).
- Objects would be identified by a 32- or 64-bit number(3);
object 0 would be a virtual object that returns a list of allocated identifiers.
- Objects would support basic file operations:
create, open, seek, read, write, truncate, erase(4,5).
Renaming and hard links would be the operating system's responsibility, of course,
as we've decided the disk has no notion of file names.
- Objects should support sparse-file semantics.
Additional possibilities and food for thought include:
- a “grow-in-the-middle” file operation:
this is hard to do on current disks because they are usually constrained
to block-size boundaries, but might be doable on a smart disk;
- storing tagged per-object metadata directly on disk
(I'm thinking Rock Ridge-like stuff here)
to store file permissions, ownership information and whatever else you may need
(not the file name, see above).
$Id: smarthd.gtml,v 1.3 2007-02-14 17:02:54 flavio Exp $