]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: align initial file allocations correctly
authorDave Chinner <dchinner@redhat.com>
Thu, 21 Nov 2013 23:41:16 +0000 (10:41 +1100)
committerBen Myers <bpm@sgi.com>
Tue, 17 Dec 2013 15:17:25 +0000 (09:17 -0600)
commit764cb45e8ff841c9d15d18bd34847c621c8e7e6e
tree01b3babf84f6c7317f115e4a97ff8188cf38fda6
parentade675015919f3eb07b779e2af33672580ab4bb9
xfs: align initial file allocations correctly

The function xfs_bmap_isaeof() is used to indicate that an
allocation is occurring at or past the end of file, and as such
should be aligned to the underlying storage geometry if possible.

Commit 5438c3a ("xfs: introduce xfs_bmap_last_extent") changed the
behaviour of this function for empty files - it turned off
allocation alignment for this case accidentally. Hence large initial
allocations from direct IO are not getting correctly aligned to the
underlying geometry, and that is cause write performance to drop in
alignment sensitive configurations.

Fix it by considering allocation into empty files as requiring
aligned allocation again.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ben Myers <bpm@sgi.com>
(cherry picked from commit f9b395a8ef8f34d19cae2cde361e19c96e097fad)
fs/xfs/xfs_bmap.c