aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/disk-io.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-04-04 13:50:24 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-04-04 13:50:24 -0400
commit4a2d057e4fc4f9ebd32351837c14c10a0773b956 (patch)
treeb0ed0187a6839ebed4982fe7589b410222fd4b9a /fs/btrfs/disk-io.c
parent9735a22799b9214d17d3c231fe377fc852f042e9 (diff)
parent1fa64f198b9f8d6ec0f7aec7c18dc94684391140 (diff)
Merge branch 'PAGE_CACHE_SIZE-removal'
Merge PAGE_CACHE_SIZE removal patches from Kirill Shutemov: "PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} macros were introduced *long* time ago with promise that one day it will be possible to implement page cache with bigger chunks than PAGE_SIZE. This promise never materialized. And unlikely will. Let's stop pretending that pages in page cache are special. They are not. The first patch with most changes has been done with coccinelle. The second is manual fixups on top. The third patch removes macros definition" [ I was planning to apply this just before rc2, but then I spaced out, so here it is right _after_ rc2 instead. As Kirill suggested as a possibility, I could have decided to only merge the first two patches, and leave the old interfaces for compatibility, but I'd rather get it all done and any out-of-tree modules and patches can trivially do the converstion while still also working with older kernels, so there is little reason to try to maintain the redundant legacy model. - Linus ] * PAGE_CACHE_SIZE-removal: mm: drop PAGE_CACHE_* and page_cache_{get,release} definition mm, fs: remove remaining PAGE_CACHE_* and page_cache_{get,release} usage mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r--fs/btrfs/disk-io.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index d01f89d130e0..4e47849d7427 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -1062,7 +1062,7 @@ static void btree_invalidatepage(struct page *page, unsigned int offset,
1062 (unsigned long long)page_offset(page)); 1062 (unsigned long long)page_offset(page));
1063 ClearPagePrivate(page); 1063 ClearPagePrivate(page);
1064 set_page_private(page, 0); 1064 set_page_private(page, 0);
1065 page_cache_release(page); 1065 put_page(page);
1066 } 1066 }
1067} 1067}
1068 1068
@@ -1764,7 +1764,7 @@ static int setup_bdi(struct btrfs_fs_info *info, struct backing_dev_info *bdi)
1764 if (err) 1764 if (err)
1765 return err; 1765 return err;
1766 1766
1767 bdi->ra_pages = VM_MAX_READAHEAD * 1024 / PAGE_CACHE_SIZE; 1767 bdi->ra_pages = VM_MAX_READAHEAD * 1024 / PAGE_SIZE;
1768 bdi->congested_fn = btrfs_congested_fn; 1768 bdi->congested_fn = btrfs_congested_fn;
1769 bdi->congested_data = info; 1769 bdi->congested_data = info;
1770 bdi->capabilities |= BDI_CAP_CGROUP_WRITEBACK; 1770 bdi->capabilities |= BDI_CAP_CGROUP_WRITEBACK;
@@ -2542,7 +2542,7 @@ int open_ctree(struct super_block *sb,
2542 err = ret; 2542 err = ret;
2543 goto fail_bdi; 2543 goto fail_bdi;
2544 } 2544 }
2545 fs_info->dirty_metadata_batch = PAGE_CACHE_SIZE * 2545 fs_info->dirty_metadata_batch = PAGE_SIZE *
2546 (1 + ilog2(nr_cpu_ids)); 2546 (1 + ilog2(nr_cpu_ids));
2547 2547
2548 ret = percpu_counter_init(&fs_info->delalloc_bytes, 0, GFP_KERNEL); 2548 ret = percpu_counter_init(&fs_info->delalloc_bytes, 0, GFP_KERNEL);
@@ -2787,7 +2787,7 @@ int open_ctree(struct super_block *sb,
2787 * flag our filesystem as having big metadata blocks if 2787 * flag our filesystem as having big metadata blocks if
2788 * they are bigger than the page size 2788 * they are bigger than the page size
2789 */ 2789 */
2790 if (btrfs_super_nodesize(disk_super) > PAGE_CACHE_SIZE) { 2790 if (btrfs_super_nodesize(disk_super) > PAGE_SIZE) {
2791 if (!(features & BTRFS_FEATURE_INCOMPAT_BIG_METADATA)) 2791 if (!(features & BTRFS_FEATURE_INCOMPAT_BIG_METADATA))
2792 printk(KERN_INFO "BTRFS: flagging fs with big metadata feature\n"); 2792 printk(KERN_INFO "BTRFS: flagging fs with big metadata feature\n");
2793 features |= BTRFS_FEATURE_INCOMPAT_BIG_METADATA; 2793 features |= BTRFS_FEATURE_INCOMPAT_BIG_METADATA;
@@ -2837,7 +2837,7 @@ int open_ctree(struct super_block *sb,
2837 2837
2838 fs_info->bdi.ra_pages *= btrfs_super_num_devices(disk_super); 2838 fs_info->bdi.ra_pages *= btrfs_super_num_devices(disk_super);
2839 fs_info->bdi.ra_pages = max(fs_info->bdi.ra_pages, 2839 fs_info->bdi.ra_pages = max(fs_info->bdi.ra_pages,
2840 SZ_4M / PAGE_CACHE_SIZE); 2840 SZ_4M / PAGE_SIZE);
2841 2841
2842 tree_root->nodesize = nodesize; 2842 tree_root->nodesize = nodesize;
2843 tree_root->sectorsize = sectorsize; 2843 tree_root->sectorsize = sectorsize;
@@ -4076,9 +4076,9 @@ static int btrfs_check_super_valid(struct btrfs_fs_info *fs_info,
4076 ret = -EINVAL; 4076 ret = -EINVAL;
4077 } 4077 }
4078 /* Only PAGE SIZE is supported yet */ 4078 /* Only PAGE SIZE is supported yet */
4079 if (sectorsize != PAGE_CACHE_SIZE) { 4079 if (sectorsize != PAGE_SIZE) {
4080 printk(KERN_ERR "BTRFS: sectorsize %llu not supported yet, only support %lu\n", 4080 printk(KERN_ERR "BTRFS: sectorsize %llu not supported yet, only support %lu\n",
4081 sectorsize, PAGE_CACHE_SIZE); 4081 sectorsize, PAGE_SIZE);
4082 ret = -EINVAL; 4082 ret = -EINVAL;
4083 } 4083 }
4084 if (!is_power_of_2(nodesize) || nodesize < sectorsize || 4084 if (!is_power_of_2(nodesize) || nodesize < sectorsize ||