block_truncate_page() does a __mark_buffer_dirty(bh) at the end, but it
does not file the buffer on the inode's dirty data queue, so only
bdflush can ever get to it, and other sync mechanisms which call
fsync_inode_data_buffers() do not see it.
This was the root cause of the mapcheck program failing on fsr'd files,
it found data past EOF as a result of the failed sync after truncate.
This one seems to have the Kernel Gods' blessings, and will hopefully
be in 2.4.20.
It should not be necessary for 2.5.x, the problem does not seem to exist there.
Add buffer to inode's dirty list after truncate()
Date: Tue Sep 24 14:36:23 PDT 2002
Workarea:
stout.americas.sgi.com:/localhome/src/sandeen/2.4.x-xfs/workarea-alwaysclean
The following file(s) were checked into:
bonnie.engr.sgi.com:/isms/slinx/2.4.x-xfs
Modid: 2.4.x-xfs:slinx:128332a
linux/fs/buffer.c - 1.110
- Add buffer to inode's dirty list after truncate()
|