Skip to contentSkip to conversation

TAKE 983683 - Don't do I/O beyond eof when unreserving space

DISCUSSION Lachlan McIlroy 1 participant 1 message Sep 5, 2008

lore
Share & tools
lore
#0 lore raw

Don't do I/O beyond eof when unreserving space

When unreserving space with boundaries that are not block aligned we round up the start and round down the end boundaries and then use this function, xfs_zero_remaining_bytes(), to zero the parts of the blocks that got dropped during the rounding. The problem is we don't consider if these blocks are beyond eof. Worse still is if we encounter delayed allocations beyond eof we will try to use the magic delayed allocation block number as a real block number. If the file size is ever extended to expose these blocks then we'll go through xfs_zero_eof() to zero them anyway.

Date:  Fri Sep  5 13:50:14 AEST 2008
Workarea:  redback.melbourne.sgi.com:/home/lachlan/isms/2.6.x-xfs
Inspected by:  hch
Author:  lachlan

The following file(s) were checked into:
longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb

Modid: xfs-linux-melb:xfs-kern:32055a fs/xfs/xfs_vnodeops.c - 1.774 - changed
http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_vnodeops.c.diff?r1=text&tr1=1.774&r2=text&tr2=1.773&f=h
- Don't do I/O beyond eof when unreserving space