z3fold: extend compaction function
authorVitaly Wool <[email protected]>
Fri, 24 Feb 2017 22:57:20 +0000 (14:57 -0800)
committerLinus Torvalds <[email protected]>
Sat, 25 Feb 2017 01:46:54 +0000 (17:46 -0800)
commit1b096e5ae9f7181c770d59c6895f23a76c63adee
treeed06fa4bd36deac956ab130cd68b4d9520e78353
parentede93213aab623b3343f1d7dcb03aebac0489357
z3fold: extend compaction function

z3fold_compact_page() currently only handles the situation when there's
a single middle chunk within the z3fold page.  However it may be worth
it to move middle chunk closer to either first or last chunk, whichever
is there, if the gap between them is big enough.

This patch adds the relevant code, using BIG_CHUNK_GAP define as a
threshold for middle chunk to be worth moving.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Vitaly Wool <[email protected]>
Reviewed-by: Dan Streetman <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/z3fold.c