]> 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>
Wed, 11 Dec 2013 21:23:04 +0000 (15:23 -0600)
commit018c2a84260c28773af49edb94bedcec68860c1c
tree647d39c42d63704ae5b142edf76981d8dfd92256
parentbb79c4607cfa7bd7bf85e694cd5b23f72efcd0db
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 73ccc66 ("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>
fs/xfs/xfs_bmap.c