Regarding partition tools: I would love a "real" successor to Parititionmagic. parted had removed almost all filesystem code, so most operations are very basic. Not even efficient move operations, but also no conversions, merge/split of partitions with data etc. Partition Magic allowed almost everything one would dream to do with partitions. And it was very reliable.
A starter would be a collections of libraries (one per filesystem) which can
* check the file system
* do a full file+metadata <-> sector mapping (+ reverse operation: get free sector regions)
* move files to given sector regions
* add files by name and sector list
* needed offset+alignment for new files
* remove files
* change start + end of a file system by only moving metadata (+ a "dry run" which get the statically needed sector regions for metadata if any (super block, FAT etc.)
* create filesystem, with a dry run to get the statically needed sector regions
* align metadata to a new physical/logical/cluster sector size + change sector size (data must be moved beforehand) (physical: only optimization, logical: the new size is strict, cluster: can be greater than a sector (e.g. for fat))
* change properties from a filesystem, directory and file (at least at the first version: no abstraction needed)
All write operation should support a list of "forbidden" sector regions to e.g. ease conversions or merge operations to avoid overwriting data which aren't bound to the filesystem yet (ie: not added to its file structure). For filesystem creation: static metadata could be temporary redirected to other sectors to ease conversions - with a function to move them to the final destination.
This would allow the most needed extended operations, leaving as much as possible work in the "higher level" (e.g. allocation/move strategies).
Version 2 could support "versioned files" - ie. snapshots. Things like datasets (from zfs) could be seen as an additional directory layer at the API side (at least at the first version), zvols could be handled as files. Datasets could be an additional hierarchy type between the whole filesystem and directory structures as well or later.
Version 3 could be handling of filesystems which have more than one continuous sector regions (jbod, raidx etc.).
Version 4 would an extension to the driver so some operations could be done online ;-) For this, another function would be useful:
* reserve a sector region - permanent (if possible) or temporal (until umount)
A starter would be a collections of libraries (one per filesystem) which can
* check the file system
* do a full file+metadata <-> sector mapping (+ reverse operation: get free sector regions)
* move files to given sector regions
* add files by name and sector list
* needed offset+alignment for new files
* remove files
* change start + end of a file system by only moving metadata (+ a "dry run" which get the statically needed sector regions for metadata if any (super block, FAT etc.)
* create filesystem, with a dry run to get the statically needed sector regions
* align metadata to a new physical/logical/cluster sector size + change sector size (data must be moved beforehand) (physical: only optimization, logical: the new size is strict, cluster: can be greater than a sector (e.g. for fat))
* change properties from a filesystem, directory and file (at least at the first version: no abstraction needed)
All write operation should support a list of "forbidden" sector regions to e.g. ease conversions or merge operations to avoid overwriting data which aren't bound to the filesystem yet (ie: not added to its file structure). For filesystem creation: static metadata could be temporary redirected to other sectors to ease conversions - with a function to move them to the final destination.
This would allow the most needed extended operations, leaving as much as possible work in the "higher level" (e.g. allocation/move strategies).
Version 2 could support "versioned files" - ie. snapshots. Things like datasets (from zfs) could be seen as an additional directory layer at the API side (at least at the first version), zvols could be handled as files. Datasets could be an additional hierarchy type between the whole filesystem and directory structures as well or later.
Version 3 could be handling of filesystems which have more than one continuous sector regions (jbod, raidx etc.).
Version 4 would an extension to the driver so some operations could be done online ;-) For this, another function would be useful:
* reserve a sector region - permanent (if possible) or temporal (until umount)
Comment