]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: Use kvmalloc for allocating compressed path context
authorNikolay Borisov <nborisov@suse.com>
Mon, 1 Apr 2019 08:29:57 +0000 (11:29 +0300)
committerDavid Sterba <dsterba@suse.com>
Thu, 2 May 2019 11:48:19 +0000 (13:48 +0200)
commitfda568f307423c82c0f7c531e2b8acf1a93f5aa9
tree85fcec89523e78e9e44acb95186238245a48f06c
parente9307752e3d2b4681aebdf4a07f9954714bd70c9
btrfs: Use kvmalloc for allocating compressed path context

Recent refactoring of cow_file_range_async means it's now possible to
request a rather large physically contiguous memory via kmalloc. The
size is dependent on the number of 512k chunks that the compressed range
consists of. David reported multiple OOM messages on such large
allocations. Fix it by switching to using kvmalloc.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/inode.c