vmap: flush vmap aliases when mapping fails
authorDave Chinner <dchinner@redhat.com>
Fri, 25 Mar 2011 22:13:42 +0000 (09:13 +1100)
committerDave Chinner <david@fromorbit.com>
Fri, 25 Mar 2011 22:13:42 +0000 (09:13 +1100)
commita19fb380961f209a3a406443686647bcd01bb9a6
tree304baceb45f2b40991900a546c39663bb37814ea
parent8287889742940cf3c416e755322090d09f2829be
vmap: flush vmap aliases when mapping fails

On 32 bit systems, vmalloc space is limited and XFS can chew through
it quickly as the vmalloc space is lazily freed. This can result in
failure to map buffers, even when there is apparently large amounts
of vmalloc space available. Hence, if we fail to map a buffer, purge
the aliases that have not yet been freed to hopefuly free up enough
vmalloc space to allow a retry to succeed.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Alex Elder <aelder@sgi.com>
fs/xfs/linux-2.6/xfs_buf.c