Summary: file truncation after fsync() and following reset.
Product: Linux XFS
Component: XFS kernel code
Description of Problem:
Under x86 linux 2.4.18 (kernel from www.kernel.org) with XFS 1.2
(http://oss.sgi.com/projects/xfs/patchlist.html) found bug:
after fsync() and following reset file may be spontaneously truncated.
1. open some files for RW (1-5 files).
2. seek to the EOF
3. write whole block 4Kb.
4. seek to the middle of the file at offset n*4096 (n is any positive integer).
5. write whole block 4Kb.
6. #2-#5 repeates some times (usually 10-20 times).
7. fsync() for all files.
8. get size of the all files (for compare with next results).
8. From another process makes reboot -f -n (reboot w/o sync and w/o shutdown
process). This step simulates RESET action.
Sometimes after reset one or more files has size lesser then after fsync (may
be lost 1-4 blocks). I.e. loses last added blocks.
Updates in the middle blocks of the file _never_ lose.
All files must have the same sizes as before reset the system.
XFS configured w/o real-time section and with log on the same device as data
Mount string (in /etc/mtab) is:/dev/hda6 /mnt/xfs xfs rw 0 0
I tried understand difference fsync after writes to the EOF and to the middle
of the file.
Seems fsync after write to the EOF causes the pagebuf_write_full_page().
fsync after write to the middle of the file causes ll_rw_block().
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.