Hi,
I've seen a strange behaviour related to sparse files with non-default
extent sizes and I'm not sure if it's a bug or expected behaviour
(certainly I was not expecting it).
cd $TMPDIR
/usr/sbin/xfs_io -c "extsize 16k" .
python <<EOF
f = open("test", "w+")
f.truncate(1024*64)
f.write("A")
f.close()
EOF
what I see if I look at the file now with od for example, is that the
first filesystem block contains "A" and then zeroes, but after the 4k
offset the file contains stale data from the disk.
This doesn't happen for all values of extsize and the file size. What
I've seen that for an extent size N, file size bigger than 2*N very
often result in stale data. Many times, even a file bigger than two
blocks (8k) will show stale data too.
I haven't found any bug related to this, and I would not expect stale
data (since this is doable even by normal users, and maybe could leak
old data).
Is this a known issue?
thanks,
iustin
|