diff options
author | Chris Mason <chris.mason@oracle.com> | 2011-02-14 12:52:08 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2011-02-14 13:04:01 -0500 |
commit | e3f24cc521cb7ba60ac137abd1939e4e03435e80 (patch) | |
tree | e054136e5b2cf6a2bc9a62dd616393676cd316dd /Documentation/isapnp.txt | |
parent | eb14ab8ed24a0405fd056068b28c33a1cd846024 (diff) |
Btrfs: don't release pages when we can't clear the uptodate bits
Btrfs tracks uptodate state in an rbtree as well as in the
page bits. This is supposed to enable us to use block sizes other than
the page size, but there are a few parts still missing before that
completely works.
But, our readpage routine trusts this additional range based tracking
of uptodateness, much in the same way the buffer head up to date bits
are trusted for the other filesystems.
The problem is that sometimes we need to allocate memory in order to
split records in the rbtree, even when we are just clearing bits. This
can be difficult when our clearing function is called GFP_ATOMIC, which
can happen in the releasepage path.
So, what happens today looks like this:
releasepage called with GFP_ATOMIC
btrfs_releasepage calls clear_extent_bit
clear_extent_bit fails to allocate ram, leaving the up to date bit set
btrfs_releasepage returns success
The end result is the page being gone, but btrfs thinking the range is
up to date. Later on if someone tries to read that same page, the
btrfs readpage code will return immediately thinking the page is already
up to date.
This commit fixes things to fail the releasepage when we can't clear the
extent state bits. It covers both data pages and metadata tree blocks.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'Documentation/isapnp.txt')
0 files changed, 0 insertions, 0 deletions