On 2014-07-02 15:29, Bernhard Voelker wrote:
On 07/02/2014 01:31 PM, Carlos E. R. wrote:
But, in theory, an operating system can create a table of the sectors used by the loop file, and use that table instead of calling the filesystem libs to access the file. The file itself is static, it doesn't change in size nor location, at least while mounted: thus you really do not need to access the filesytem structures.
If the file is not fragmented, then it should be as fast as a real partition.
That's a nice trick.
Please remember that mine is an educated guess. I /did/ read that swap files are as fast as a real partition, since some version, and I /think/ I read that it also applies to loop files. I don't have confirmation on those, but, based on the theory above, I believe they do. I would have to test it, though.
I'd guess that it doesn't work with all file system types, as this assumes that the underlying file system doesn't somehow move the data along. I'm unsure if any does, but e.g. via - I know, a bad choice - NFS, the loop module couldn't rely on this assumption.
I suppose that the module can find that out. It is all part of the kernel, so if they decide to add that facility, they can add the needed features everywhere as needed :-) -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar)