diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-26 10:50:56 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-26 10:50:56 -0700 |
commit | f8d613e2a665bf1be9628a3c3f9bafe7599b32c0 (patch) | |
tree | 98d4da8d0e1a5fb1d9064626b4b96d95ccf26375 /fs/btrfs | |
parent | 8a0599dd2471f2a2e409498c08a0ab339057ad06 (diff) | |
parent | 5bc20fc59706214d9591c11e1938a629d3538c12 (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')
-rw-r--r-- | fs/btrfs/extent_io.c | 9 | ||||
-rw-r--r-- | fs/btrfs/super.c | 2 |
2 files changed, 11 insertions, 0 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 96fcfa522da..4f9893243da 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -11,6 +11,7 @@ #include <linux/writeback.h> #include <linux/pagevec.h> #include <linux/prefetch.h> +#include <linux/cleancache.h> #include "extent_io.h" #include "extent_map.h" #include "compat.h" @@ -2016,6 +2017,13 @@ static int __extent_read_full_page(struct extent_io_tree *tree, set_page_extent_mapped(page); + if (!PageUptodate(page)) { + if (cleancache_get_page(page) == 0) { + BUG_ON(blocksize != PAGE_SIZE); + goto out; + } + } + end = page_end; while (1) { lock_extent(tree, start, end, GFP_NOFS); @@ -2149,6 +2157,7 @@ static int __extent_read_full_page(struct extent_io_tree *tree, cur = cur + iosize; page_offset += iosize; } +out: if (!nr) { if (!PageError(page)) SetPageUptodate(page); diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 0ac712efcdf..be4ffa12f3e 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -39,6 +39,7 @@ #include <linux/miscdevice.h> #include <linux/magic.h> #include <linux/slab.h> +#include <linux/cleancache.h> #include "compat.h" #include "ctree.h" #include "disk-io.h" @@ -624,6 +625,7 @@ static int btrfs_fill_super(struct super_block *sb, sb->s_root = root_dentry; save_mount_options(sb, data); + cleancache_init_fs(sb); return 0; fail_close: |