]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: preallocate radix tree node for readahead
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)
commitb5b7f5cb7786fdc5ca1ca8f7ad42c3a56c54e49e
tree5fec399f1ead33f3e52de975c185eaf788ad2978
parent392e5b55c2056ac5615dc881ab7a7f0ce41ab08e
btrfs: preallocate radix tree node for readahead

We can preallocate the node so insertion does not have to do that under
the lock. The GFP flags for the per-device radix tree are initialized to
 GFP_NOFS & ~__GFP_DIRECT_RECLAIM
but we can use GFP_KERNEL, same as an allocation above anyway, but also
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/reada.c
fs/btrfs/volumes.c