That would be good. There are several ways to do this.
I think the best is to check for holes, then just map
the blocks directly w/o filesystem overhead. Refuse a
mount if there are holes.
Then there is file-on-file. Maybe holes are OK for this.
You should be able to mount a file or device on top of anything,
as a whole filesystem or just as a file.
> I can imagine interesting things might happen if you had a filesystem
> mounted r/w on a sparse file in another filesystem with no free space,
> but you can already hang yourself that way with swap files... ;-)
Either it should not be possible to swap to something with holes,
or there should be a way to swap around the holes when space runs
out. Maybe filling holes and swapping around the holes is too slow
and bug prone. I would really like swap files to have the speed
of swap partitions; they could be that fast if they bypassed the
filesystem.