aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent_io.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-05-26 13:50:56 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-05-26 13:50:56 -0400
commitf8d613e2a665bf1be9628a3c3f9bafe7599b32c0 (patch)
tree98d4da8d0e1a5fb1d9064626b4b96d95ccf26375 /fs/btrfs/extent_io.c
parent8a0599dd2471f2a2e409498c08a0ab339057ad06 (diff)
parent5bc20fc59706214d9591c11e1938a629d3538c12 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/djm/tmem
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/djm/tmem: xen: cleancache shim to Xen Transcendent Memory ocfs2: add cleancache support ext4: add cleancache support btrfs: add cleancache support ext3: add cleancache support mm/fs: add hooks to support cleancache mm: cleancache core ops functions and config fs: add field to superblock to support cleancache mm/fs: cleancache documentation Fix up trivial conflict in fs/btrfs/extent_io.c due to includes
Diffstat (limited to 'fs/btrfs/extent_io.c')
-rw-r--r--fs/btrfs/extent_io.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 96fcfa522dab..4f9893243dae 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -11,6 +11,7 @@
11#include <linux/writeback.h> 11#include <linux/writeback.h>
12#include <linux/pagevec.h> 12#include <linux/pagevec.h>
13#include <linux/prefetch.h> 13#include <linux/prefetch.h>
14#include <linux/cleancache.h>
14#include "extent_io.h" 15#include "extent_io.h"
15#include "extent_map.h" 16#include "extent_map.h"
16#include "compat.h" 17#include "compat.h"
@@ -2016,6 +2017,13 @@ static int __extent_read_full_page(struct extent_io_tree *tree,
2016 2017
2017 set_page_extent_mapped(page); 2018 set_page_extent_mapped(page);
2018 2019
2020 if (!PageUptodate(page)) {
2021 if (cleancache_get_page(page) == 0) {
2022 BUG_ON(blocksize != PAGE_SIZE);
2023 goto out;
2024 }
2025 }
2026
2019 end = page_end; 2027 end = page_end;
2020 while (1) { 2028 while (1) {
2021 lock_extent(tree, start, end, GFP_NOFS); 2029 lock_extent(tree, start, end, GFP_NOFS);
@@ -2149,6 +2157,7 @@ static int __extent_read_full_page(struct extent_io_tree *tree,
2149 cur = cur + iosize; 2157 cur = cur + iosize;
2150 page_offset += iosize; 2158 page_offset += iosize;
2151 } 2159 }
2160out:
2152 if (!nr) { 2161 if (!nr) {
2153 if (!PageError(page)) 2162 if (!PageError(page))
2154 SetPageUptodate(page); 2163 SetPageUptodate(page);