xfs: byte range granularity for XFS_IOC_ZERO_RANGE
authorDave Chinner <dchinner@redhat.com>
Thu, 29 Nov 2012 04:26:33 +0000 (15:26 +1100)
committerBen Myers <bpm@sgi.com>
Thu, 29 Nov 2012 20:21:46 +0000 (14:21 -0600)
commitef9d873344ff9f5084eacb9f3735982314dfda9e
tree5ef54dd33ac54de24239fecf36c0c960f6f70972
parent7c4cebe8e02dd0b0e655605442bbe9268db9ed4f
xfs: byte range granularity for XFS_IOC_ZERO_RANGE

XFS_IOC_ZERO_RANGE simply does not work properly for non page cache
aligned ranges. Neither test 242 or 290 exercise this correctly, so
the behaviour is completely busted even though the tests pass.

Fix it to support full byte range granularity as was originally
intended for this ioctl.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ben Myers <bpm@sgi.com>
fs/xfs/xfs_file.c
fs/xfs/xfs_vnodeops.c
fs/xfs/xfs_vnodeops.h