Commit 93a65e6
committed
zswap: break the strict dependency from lz4
From the beginning, the zswap block device has always required CRYPTO_LZ4 to be enabled, since lz4 is hardcoded as the default compression algorithm. As a consequence, when a different compression algorithm is hardcoded and the respective CRYPTO_<algo> is not enabled, zswap would not be used therefore causing an issue when swap is needed.
This patch removes the hardcoded lz4 dependency and allows the user to select the default compression algorithm for zswap at build time. The previous behaviour is kept, as the default compression algorithm is still lz4.
This patch was inspired by [1].
[1]: torvalds/linux@3d711a3
Signed-off-by: Cyber Knight <cyberknight755@gmail.com>1 parent 9cb7082 commit 93a65e6
2 files changed
Lines changed: 30 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
571 | 571 | | |
572 | 572 | | |
573 | 573 | | |
574 | | - | |
| 574 | + | |
575 | 575 | | |
576 | 576 | | |
577 | 577 | | |
| |||
589 | 589 | | |
590 | 590 | | |
591 | 591 | | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
592 | 617 | | |
593 | 618 | | |
594 | 619 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
89 | | - | |
| 88 | + | |
90 | 89 | | |
91 | 90 | | |
92 | 91 | | |
| |||
513 | 512 | | |
514 | 513 | | |
515 | 514 | | |
516 | | - | |
| 515 | + | |
517 | 516 | | |
518 | | - | |
| 517 | + | |
519 | 518 | | |
520 | | - | |
| 519 | + | |
521 | 520 | | |
522 | 521 | | |
523 | 522 | | |
| |||
0 commit comments