Make hole punching at EOF atomic.
If hole punching at EOF is done as two steps (i.e. truncate then extend)
the file is in a transient state between the two steps where an
application can see the incorrect file size. Punching a hole to
EOF needs to be treated in teh same way as all other hole punching
cases so that the file size is never seen to change.
Date: Tue May 22 10:13:27 AEST 2007
Inspected by: vapo@xxxxxxx
The following file(s) were checked into:
fs/xfs/xfs_rw.h - 1.81 - changed
- export and define flags for xfs_free_eofblocks.
fs/xfs/xfs_vnodeops.c - 1.696 - changed
- convert callers to new xfs_free_eofblocks() interface and allow it
to be called with the iolock already held.
fs/xfs/linux-2.6/xfs_ksyms.c - 1.58 - changed
- export xfs_free_eofblocks.
fs/xfs/dmapi/xfs_dm.c - 1.36 - changed
- Use UNRESVSP to punch a hole at EOF rather than FREESP + xfs_setattr
to return truncate and extend the file. THis means we also need to
truncate away blocks past EOF using xfs_free_eofblocks().