]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: preallocate compression workspaces
authorDavid Sterba <dsterba@suse.com>
Wed, 27 Apr 2016 00:55:15 +0000 (02:55 +0200)
committerDavid Sterba <dsterba@suse.com>
Tue, 10 May 2016 07:46:11 +0000 (09:46 +0200)
commit5a67a67aabb34dac0aa08e35f74d30025ccf03ce
tree07b4e749c8d70ed68fbe2b5ec5e7930af2abb687
parent2767417cb7624929a29bc9aaa70f6ce8d3eeed1e
btrfs: preallocate compression workspaces

Preallocate one workspace for each compression type so we can guarantee
forward progress in the worst case. A failure cannot be a hard error as
we might not use compression at all on the filesystem. If we can't
allocate the workspaces later when need them, it might actually
deadlock, but in such situation the system has effectively not enough
memory to operate properly.

Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/compression.c