Hello.
Bart Oldeman wrote:
mremap is behaving consistently (i.e. if you mmap bytes 4096-8191 of a file with size 4000 you can't expect that file to be extended to 8192 bytes, the same is true for shm virtual files.
I just think kernel must hide that
things from userspace and resolve
them internally. "man mmap" says:
---
MAP_ANONYMOUS
The mapping is not backed by any file
---
So there should be no considerations
about a file resizing on a userspace.
For userspace it must behave as if there
is no file involved, otherwise it
contradicts with docs I think.What I was thinking about a cheap work around, is probably to allocate the new region the way your hack does, but then, instead of memcpy(), still use mremap() MREMAP_FIXED to remap the old region to the beginning of the new one. This will preserve the aliases, but will probably not work reliably... at least that looks extremely risky to do. - To unsubscribe from this list: send the line "unsubscribe linux-msdos" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
