diff options
author | David Sterba <dsterba@suse.com> | 2017-03-02 18:54:52 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-04-18 14:07:25 +0200 |
commit | 7ef70b4d9987a78d39c4e40a02093493333e5408 (patch) | |
tree | 95d61665823af9253ba7fa6a00a84754ab820c93 /fs/btrfs/disk-io.c | |
parent | btrfs: preallocate radix tree node for readahead (diff) | |
download | linux-7ef70b4d9987a78d39c4e40a02093493333e5408.tar.xz linux-7ef70b4d9987a78d39c4e40a02093493333e5408.zip |
btrfs: preallocate radix tree node for global readahead tree
We can preallocate the node so insertion does not have to do that under
the lock. The GFP flags for the global radix tree are initialized to
GFP_NOFS & ~__GFP_DIRECT_RECLAIM
but we can use GFP_KERNEL, because readahead is optional and not on any
critical writeout path.
Reviewed-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r-- | fs/btrfs/disk-io.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index bd415e1dd114..12eba54877c2 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -2693,7 +2693,7 @@ int open_ctree(struct super_block *sb, fs_info->commit_interval = BTRFS_DEFAULT_COMMIT_INTERVAL; fs_info->avg_delayed_ref_runtime = NSEC_PER_SEC >> 6; /* div by 64 */ /* readahead state */ - INIT_RADIX_TREE(&fs_info->reada_tree, GFP_NOFS & ~__GFP_DIRECT_RECLAIM); + INIT_RADIX_TREE(&fs_info->reada_tree, GFP_KERNEL); spin_lock_init(&fs_info->reada_lock); fs_info->thread_pool_size = min_t(unsigned long, |