BUG/MEDIUM: chunk: Review chunks usage to not retrieve a large buffer by error
All calls to get_trash_chunk_sz() and alloc_trash_chunk_sz() were reviewed
to be sure we never retrieve a large chunk when it is not expected. Some
calls were not upgrade, but several calls now rely on get_best_trash_chunk()
and alloc_best_trash_chunk() functions.
The idea of the fix is to get a large buffer only when the original buffer
is already a large buffer and the expected size of data exceeds the size of
a regular buffer. This should prevent unexpected memory usage.
This commit relies on the previous one:
MINOR: chunk: Add function to get a large/regular chunk depending on a buffer