]> www.infradead.org Git - users/jedix/linux-maple.git/commit
Btrfs: only map pages if we know we need them when reading the space cache
authorJosef Bacik <josef@redhat.com>
Fri, 11 Nov 2011 01:45:05 +0000 (20:45 -0500)
committerChris Mason <chris.mason@oracle.com>
Wed, 16 Nov 2011 02:21:01 +0000 (21:21 -0500)
commit5ba9ab0df8fba692f62b074f7dfd88d23ae5cfc7
treef0fa00728a8c587b3d1023a6e85e1d97c49bac4e
parent50a3db2c6a9015b6b3e8b4a1ce6abb5f8ec59be9
Btrfs: only map pages if we know we need them when reading the space cache

People have been running into a warning when loading space cache because the
page is already mapped when trying to read in a bitmap.  The way we read in
entries and pages is kind of convoluted, so fix it so that io_ctl_read_entry
maps the entries if it needs to, and if it hits the end of the page it simply
unmaps the page.  That way we can unconditionally unmap the io_ctl before
reading in the bitmap and we should stop hitting these warnings.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
(cherry picked from commit 2f120c05e67ae34c93786b1050c6828904314429)
fs/btrfs/free-space-cache.c