+#ifdef CONFIG_F2FS_FS_COMPRESSION
Can remove this by if (unaligned)?
+ if (unaligned)
+ en->plen = ((struct extent_info_unaligned *)ei)->plen;
static inline bool __is_extent_mergeable(struct extent_info *back,
- struct extent_info *front)
+ struct extent_info *front, bool unaligned)
{
+#ifdef CONFIG_F2FS_FS_COMPRESSION
This can be controlled by "bool unaligned"?
+ struct extent_info_unaligned *be = (struct extent_info_unaligned *)back;
+ struct extent_info_unaligned *fe = (struct extent_info_unaligned *)front;
+
+ if (unaligned && (be->ei.len != be->plen || fe->ei.len != fe->plen))
+ return false;
+#endif