just copied a 12GB _sparse_? file to a new created ext4 filesystem on a 2.6.35.4 kernel. md5sum -ed it and everytime it's a new hash! original file's md5sum is always calculated corretly. Reproducible: Always Steps to Reproduce: 1. copy a large enough _sparse_? file to an ext4 filesystem. (12GB was my file) 2. md5sum the file copied. 3. hash is different everytime you do it. Actual Results: md5 hash changes everytime it's run for copied file. Expected Results: md5 hash should calculate the same hash every time.
It is my understanding that sparse files are not ever copied sparsely unless you tell the app to do it. tar -S, cp --sparse, rsync --sparse, etc. What did you do?
I've tried both with and without --sparse. It shouldn't matter anyway as the content of a file should still remain the same no matter how they are stored on the filesystem. If ext4 wants to treat them differently, then fine but when I read my file back I well expect to get the same file.
I think it could be a problem of md5sum rather than of ext4. Does the same happen if you run: # cat filename | md5sum
md5sum and sha256sum both generate random messages every time run on the copied version. They both agree on the message computed when run on the original file (stored on an ext3).
Please copy the output of `tune2fs -l /dev/<your-ext4-disk>' into a comment.
I've updated the kernel to 2.6.35.7 and reformatted the file system ext3 now. I'll report back once I've added a new ext4 with the same problem, hopefully the problem will not be showing on the new kernel.
Then please reopen this bug report when you have more information.