#define EROFS_FEATURE_COMPAT_SB_CHKSUM          0x00000001
 #define EROFS_FEATURE_COMPAT_MTIME              0x00000002
 #define EROFS_FEATURE_COMPAT_XATTR_FILTER      0x00000004
+#define EROFS_FEATURE_COMPAT_SHARED_EA_IN_METABOX      0x00000008
 
 /*
  * Any bits that aren't in EROFS_ALL_FEATURE_INCOMPAT should
 #define EROFS_FEATURE_INCOMPAT_DEDUPE          0x00000020
 #define EROFS_FEATURE_INCOMPAT_XATTR_PREFIXES  0x00000040
 #define EROFS_FEATURE_INCOMPAT_48BIT           0x00000080
+#define EROFS_FEATURE_INCOMPAT_METABOX         0x00000100
 #define EROFS_ALL_FEATURE_INCOMPAT             \
        ((EROFS_FEATURE_INCOMPAT_48BIT << 1) - 1)
 
 };
 #define EROFS_DEVT_SLOT_SIZE   sizeof(struct erofs_deviceslot)
 
-/* erofs on-disk super block (currently 128 bytes) */
+/* erofs on-disk super block (currently 144 bytes at maximum) */
 struct erofs_super_block {
        __le32 magic;           /* file system magic number */
        __le32 checksum;        /* crc32c to avoid unexpected on-disk overlap */
        __u8 reserved[3];
        __le32 build_time;      /* seconds added to epoch for mkfs time */
        __le64 rootnid_8b;      /* (48BIT on) nid of root directory */
-       __u8 reserved2[8];
+       __le64 reserved2;
+       __le64 metabox_nid;     /* (METABOX on) nid of the metabox inode */
+       __le64 reserved3;       /* [align to extslot 1] */
 };
 
 /*
        __le32 startblk_lo;     /* starting block number of this chunk */
 };
 
+#define EROFS_DIRENT_NID_METABOX_BIT   63
+#define EROFS_DIRENT_NID_MASK  (BIT_ULL(EROFS_DIRENT_NID_METABOX_BIT) - 1)
+
 /* dirent sorts in alphabet order, thus we can do binary search */
 struct erofs_dirent {
        __le64 nid;     /* node number */
                .h_clusterbits = 1 << Z_EROFS_FRAGMENT_INODE_BIT
        };
 
-       BUILD_BUG_ON(sizeof(struct erofs_super_block) != 128);
+       BUILD_BUG_ON(sizeof(struct erofs_super_block) != 144);
        BUILD_BUG_ON(sizeof(struct erofs_inode_compact) != 32);
        BUILD_BUG_ON(sizeof(struct erofs_inode_extended) != 64);
        BUILD_BUG_ON(sizeof(struct erofs_xattr_ibody_header) != 12);
 
 EROFS_FEATURE_FUNCS(dedupe, incompat, INCOMPAT_DEDUPE)
 EROFS_FEATURE_FUNCS(xattr_prefixes, incompat, INCOMPAT_XATTR_PREFIXES)
 EROFS_FEATURE_FUNCS(48bit, incompat, INCOMPAT_48BIT)
+EROFS_FEATURE_FUNCS(metabox, incompat, INCOMPAT_METABOX)
 EROFS_FEATURE_FUNCS(sb_chksum, compat, COMPAT_SB_CHKSUM)
 EROFS_FEATURE_FUNCS(xattr_filter, compat, COMPAT_XATTR_FILTER)
+EROFS_FEATURE_FUNCS(shared_ea_in_metabox, compat, COMPAT_SHARED_EA_IN_METABOX)
 
 /* atomic flag definitions */
 #define EROFS_I_EA_INITED_BIT  0