K 10 svn:author V 6 marcel K 8 svn:date V 27 2014-09-28T18:34:20.846465Z K 7 svn:log V 964 Implement image_copyin_mapped(): 1. If we can't seek, then let image_copyin_stream() deal with it. 2. Use SEEK_HOLE and SEEK_DATA to iterate over the regions of a sparse file. 3. Round or truncate to the sector size based on whether it's a hold or data. We truncate for holes and round for data. This to make sure to handle sparse files correctly when the sector size is larger than the file system's block/fragment size. Since we detect runts of zeroes for mmap'd data (to handle streams), we correct ourselves if such is applicable. We never mishandle data, which is the most important. I need to check with a file system that doesn't support sparse files what SEEK_HOLE and SEEK_DATA return. I'm thinking -1, which is what I don't handle yet. It's easy to do, because everything should be treated as data and we'll find the holes the hard way. While here: set DEBUG_FLAGS unconditionally to make sure I can always debug a core. END