Markus Armbruster wrote: > A possible reason why we currently expose format and protocol at the > user interface is to avoid stacking there.
Pragmatic solution?: A few generic flags in each stacking module ("format/protocol/transport"), which govern which other modules are allowed to stack on top or underneath. For example, vvfat may provide a blockdev-like abstraction, along with flags STACK_ABOVE_ONLY_RAW | STACK_BELOW_ONLY_DIRECTORY, which means "raw" and "blkdebug" are allowed above (of course ;-) but other things like the image formats shouldn't be. And below, it can't stack on a blockdev-like abstraction, but needs a directory and uses filesystem operations on it - the thing that Plan9fs needs. Btw, I think we expose "format" because "virtual disk image file format" is a useful and meaningful concept to users. When someone needs to use a .VMDK file, they know it as a "VMDK format file", not "I must use the VMDK protocol with this file". -- Jamie