|
|
@@ -607,12 +607,11 @@ cont:
|
|
|
|
|
|
/*
|
|
|
* one last check to make sure the compression is really a
|
|
|
- * win, compare the page count read with the blocks on disk
|
|
|
+ * win, compare the page count read with the blocks on disk,
|
|
|
+ * compression must free at least one sector size
|
|
|
*/
|
|
|
total_in = ALIGN(total_in, PAGE_SIZE);
|
|
|
- if (total_compressed >= total_in) {
|
|
|
- will_compress = 0;
|
|
|
- } else {
|
|
|
+ if (total_compressed + blocksize <= total_in) {
|
|
|
num_bytes = total_in;
|
|
|
*num_added += 1;
|
|
|
|