Write at EOF may not update filesize correctly.
The recent fix for preventing NULL files from being left around
does not update the file size corectly in all cases. The missing
case is a write extending the file that does not need to allocate
a block.
In that case we used a read mapping of the extent which forced
the use of the read I/O completion handler instead of the
write I/O completion handle. Hence the file size was not updated
on I/O completion.
Date: Wed May 23 10:58:50 AEST 2007
Workarea: chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs
Inspected by: nscott@xxxxxxxxxx
The following file(s) were checked into:
longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb
Modid: xfs-linux-melb:xfs-kern:28657a
fs/xfs/linux-2.6/xfs_aops.c - 1.143 - changed
http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/linux-2.6/xfs_aops.c.diff?r1=text&tr1=1.143&r2=text&tr2=1.142&f=h
- Ensure we use an I/O completion handler that can update the filesize
for all types of write regardless of whether we need to do allocation
or not.
|