commit | bf5091c8d69e95c34dab2224b98a9cb0ccff1aa8 | [log] [tgz] |
---|---|---|
author | David Sterba <dsterba@suse.com> | Fri May 11 17:57:54 2018 +0200 |
committer | David Sterba <dsterba@suse.com> | Mon May 28 18:24:09 2018 +0200 |
tree | ac3fff8b933faca399ed8edf10f1f3d3c4b9279d | |
parent | 67b07bd4bec53be0aa5a8496aef7a4ee2c7f97bf [diff] |
btrfs: use kvzalloc for EXTENT_SAME temporary data The dedupe range is 16 MiB, with 4 KiB pages and 8 byte pointers, the arrays can be 32KiB large. To avoid allocation failures due to fragmented memory, use the allocation with fallback to vmalloc. The arrays are allocated and freed only inside btrfs_extent_same and reused for all the ranges. Reviewed-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>