struct jffs2_raw_summary { jint16_t magic; /* A constant magic number. */ jint16_t nodetype; /* = JFFS2_NODETYPE_SUMMARY */ jint32_t totlen; /* Total length of this node (inc data, etc.) */ jint32_t hdr_crc; /* CRC checksum */ jint32_t sum_num; /* number of sum entries */ jint32_t cln_mkr; /* clean marker size, 0 = no cleanmarker */ jint32_t padded; /* sum of the size of padding nodes */ jint32_t sum_crc; /* summary information CRC */ jint32_t node_crc; /* node CRC */ jint32_t sum[0]; /* inode summary info */ };
After the common header sum_num is the number of the summary entries that summary node involves. On NOR memory every completely erased eraseblock begins with a cleanmarker, cln_mkr is the size of the cleanmarker, if there is no cleanmarker (NAND) then it is set to 0. padded is the size of the padded space in the eraseblock. sum_crc is a CRC checksum of the summary data including the sum_marker.
Total size: 32 bytes
Summary data contains two different type of subnodes and a closing node:
struct jffs2_sum_inode_flash { jint16_t nodetype; /* == JFFS2_NODETYPE_INODE */ jint32_t inode; /* inode number */ jint32_t version; /* inode version */ jint32_t offset; /* offset on jeb */ jint32_t totlen; /* record length */ }; size = 18 bytesThis node involves only the necessary information about the dnode needed by the scan process.
struct jffs2_sum_dirent_flash { jint16_t nodetype; /* == JFFS_NODETYPE_DIRENT */ jint32_t totlen; /* record length */ jint32_t offset; /* ofset on jeb */ jint32_t pino; /* parent inode */ jint32_t version; /* dirent version */ jint32_t ino; /* == zero for unlink */ uint8_t nsize; /* dirent name size */ uint8_t type; /* dirent type */ uint8_t name[0]; /* dirent name */ }; size = 24 + name length + 1 bytesThis node involves only the necessary information about the dirent needed by the scan process.
struct jffs2_sum_marker { jint32_t offset; /* Offset of the summary_node in the jeb */ jint32_t magic; /* Magic number (identifies the sum_marker node) */ }; size = 8 bytes
offset is offset from the beginning of the erase block. This offset shows whence we should read the summary node.