Skip to contentSkip to conversation

erofs-utils: lib: restrict pcluster size limitations

PATCH New Gao Xiang 1 participant 1 message Feb 9, 2025 Library code

lore
Share & tools
lore

Gao Xiang

author
#0 lore raw

PATCH 1/1 erofs-utils: lib: restrict pcluster size limitations

Source kernel commit: 7c3ca1838a7831855cbf2e6927a10e0e4723edf6

---
 include/erofs_fs.h |  5 ++++-
 lib/zmap.c         | 41 ++++++++++++++++++++---------------------
 2 files changed, 24 insertions(+), 22 deletions(-)
include/erofs_fs.h +4 -1
index 5672c99..269d302 100644
@@ -297,9 +297,12 @@ enum {
 
 #define EROFS_NAME_LEN      255
 
-/* maximum supported size of a physical compression cluster */
+/* maximum supported encoded size of a physical compressed cluster */
 #define Z_EROFS_PCLUSTER_MAX_SIZE	(1024 * 1024)
 
+/* maximum supported decoded size of a physical compressed cluster */
+#define Z_EROFS_PCLUSTER_MAX_DSIZE	(12 * 1024 * 1024)
+
 /* available compression algorithm types (for h_algorithmtype) */
 enum {
 	Z_EROFS_COMPRESSION_LZ4		= 0,
lib/zmap.c +20 -21

50 lines not on this page · raw message

Signature · 1 line
2.43.5