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>
Wed, 27 Apr 2016 00:59:37 +0000 (02:59 +0200)
commit3853368b95f27d9bdaf9e15bc1e11753f11e3c43
tree87e0fa123eb222cae0849c783ce7655dc96d49cc
parentb7bde4178a61a6855e1afebb60db4358dbbb6830
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
This page took 0.028572 seconds and 5 git commands to generate.