Hi, the compression workspaces are allocated as needed an this could fail if there's no free memory. Moreover, as we might be flushing data from the restricted contexts we should try our best not to fail.
This patchset preallocates one workspace for each compression type at module load time (and tries to get one if that fails later). If any further request for new workspace fails, there's still that one to make progress. IOW workspace allocation will not fail at writeback time. I have tested this by instrumenting the code to limit the number of workspaces to one and did some stress tests. David Sterba (4): btrfs: rename and document compression workspace members btrfs: preallocate compression workspaces btrfs: make find_workspace always succeed btrfs: make find_workspace warn if there are no workspaces fs/btrfs/compression.c | 85 ++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 61 insertions(+), 24 deletions(-) -- 2.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html