• David Sterba's avatar
    btrfs: make find_workspace always succeed · e721e49d
    David Sterba authored
    With just one preallocated workspace we can guarantee forward progress
    even if there's no memory available for new workspaces. The cost is more
    waiting but we also get rid of several error paths.
    
    On average, there will be several idle workspaces, so the waiting
    penalty won't be so bad.
    
    In the worst case, all cpus will compete for one workspace until there's
    some memory. Attempts to allocate a new one are done each time the
    waiters are woken up.
    Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
    e721e49d
compression.c 28.2 KB