]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit - fs/btrfs/reada.c
btrfs: preallocate radix tree node for global readahead tree
authorDavid Sterba <dsterba@suse.com>
Thu, 2 Mar 2017 17:54:52 +0000 (18:54 +0100)
committerDavid Sterba <dsterba@suse.com>
Tue, 18 Apr 2017 12:07:25 +0000 (14:07 +0200)
commit7ef70b4d9987a78d39c4e40a02093493333e5408
tree95d61665823af9253ba7fa6a00a84754ab820c93
parentcc8385b59e17d489814d54d6a846aba7051fdea5
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>
fs/btrfs/disk-io.c
fs/btrfs/reada.c