]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs_fsr: file reads should be O_DIRECT
authorDave Chinner <dchinner@redhat.com>
Thu, 9 May 2013 12:16:09 +0000 (07:16 -0500)
committerRich Johnston <rjohnston@sgi.com>
Thu, 9 May 2013 12:16:09 +0000 (07:16 -0500)
commit108e985bc596a1f1a33d31a348fdb430213fb8c0
tree65b7856ea2d3801d1ab2455c05d6d02205d4ac32
parenta59111c1fc89a8bb5bd1030efce8b75f583e9b1e
xfs_fsr: file reads should be O_DIRECT

When running xfs_fsr on a sparse filesystem image containing
approximately 8 million extents and 80GB of data, I noticed that the
page cache grew and consumed all the memory in the machine. It turns
out that xfs_fsr is using direct IO to write data, but buffered IO
to read data. Convert the read side to use direct IO to prevent page
cache blowouts.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
fsr/xfs_fsr.c