Sunil Mushran wrote: > SEEK_HOLE/DATA also have the same problem with active files.
Yes, that's true if 'cp' is copying a file while someone else is writing to it. But the case we're worried about is when 'cp' starts copying a file immediately after someone else has finished writing to it but data has not been sent to disk; in that case SEEK_HOLE/DATA should work just as well as the fiemap ioctl.