1 /* 2 * Copyright (c) 2024-2024 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef EROFS_H 17 #define EROFS_H 18 19 #include <linux/types.h> 20 21 #define EROFS_SUPER_MAGIC 0xE0F5E1E2 22 #define EROFS_SUPER_BLOCK_START_POSITION 1024 23 24 struct erofs_super_block { 25 __le32 magic; 26 __le32 checksum; 27 __le32 feature_compat; 28 __u8 blkszbits; 29 __u8 reserved; 30 31 __le16 root_nid; 32 __le64 inos; 33 34 __le64 build_time; 35 __le32 build_time_nsec; 36 __le32 blocks; 37 __le32 meta_blkaddr; 38 __le32 xattr_blkaddr; 39 __u8 uuid[16]; 40 __u8 volume_name[16]; 41 __le32 feature_incompat; 42 __u8 reserved2[44]; 43 } __attribute((packed)); /* 128 byte */ 44 45 #endif