mtd/include/linux jffs2.h,1.38,1.39 jffs2_fs_sb.h,1.54,1.55
Forrest Zhao
forrest.zhao at intel.com
Fri Nov 4 03:06:30 EST 2005
Update of /home/cvs/mtd/include/linux
In directory phoenix.infradead.org:/tmp/cvs-serv31513/include/linux
Modified Files:
jffs2.h jffs2_fs_sb.h
Log Message:
Clean marker is gone! This patch introduce Erase Block Header(EBH) to JFFS2. EBH resides at the beginning of each eraseb block and carries the meta data for that erase block. If you want to add new per-erase-block information, you may use EBH to make extension. Now we record the erase count of each erase block in EBH.
Also this patch modified the user-space utilities to make them accormodate to EBH.
Index: jffs2.h
===================================================================
RCS file: /home/cvs/mtd/include/linux/jffs2.h,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- jffs2.h 26 Sep 2005 11:37:23 -0000 1.38
+++ jffs2.h 4 Nov 2005 08:06:26 -0000 1.39
@@ -28,6 +28,11 @@
#define JFFS2_EMPTY_BITMASK 0xffff
#define JFFS2_DIRTY_BITMASK 0x0000
+/* JFFS2 eraseblock header compat/incompat/rocompat features set */
+#define JFFS2_EBH_COMPAT_FSET 0x00
+#define JFFS2_EBH_INCOMPAT_FSET 0x00
+#define JFFS2_EBH_ROCOMPAT_FSET 0x00
+
/* Summary node MAGIC marker */
#define JFFS2_SUM_MAGIC 0x02851885
@@ -63,6 +68,7 @@
#define JFFS2_NODETYPE_CLEANMARKER (JFFS2_FEATURE_RWCOMPAT_DELETE | JFFS2_NODE_ACCURATE | 3)
#define JFFS2_NODETYPE_PADDING (JFFS2_FEATURE_RWCOMPAT_DELETE | JFFS2_NODE_ACCURATE | 4)
+#define JFFS2_NODETYPE_ERASEBLOCK_HEADER (JFFS2_FEATURE_RWCOMPAT_DELETE | JFFS2_NODE_ACCURATE | 5)
#define JFFS2_NODETYPE_SUMMARY (JFFS2_FEATURE_RWCOMPAT_DELETE | JFFS2_NODE_ACCURATE | 6)
// Maybe later...
@@ -165,11 +171,28 @@
jint32_t sum[0]; /* inode summary info */
} __attribute__((packed));
+struct jffs2_raw_ebh
+{
+ jint16_t magic;
+ jint16_t nodetype; /* == JFFS2_NODETYPE_ERASEBLOCK_HEADER */
+ jint32_t totlen;
+ jint32_t hdr_crc;
+ jint32_t node_crc;
+ uint8_t reserved; /* reserved for future use and alignment */
+ uint8_t compat_fset;
+ uint8_t incompat_fset;
+ uint8_t rocompat_fset;
+ jint32_t erase_count; /* the erase count of this erase block */
+ jint32_t data[0];
+} __attribute__((packed));
+
+
union jffs2_node_union
{
struct jffs2_raw_inode i;
struct jffs2_raw_dirent d;
struct jffs2_raw_summary s;
+ struct jffs2_raw_ebh eh;
struct jffs2_unknown_node u;
};
Index: jffs2_fs_sb.h
===================================================================
RCS file: /home/cvs/mtd/include/linux/jffs2_fs_sb.h,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -r1.54 -r1.55
--- jffs2_fs_sb.h 21 Sep 2005 13:37:34 -0000 1.54
+++ jffs2_fs_sb.h 4 Nov 2005 08:06:27 -0000 1.55
@@ -115,6 +115,8 @@
struct jffs2_summary *summary; /* Summary information */
+ uint32_t ebh_size; /* This is the space size occupied by eraseblock_header on flash */
+
/* OS-private pointer for getting back to master superblock info */
void *os_priv;
};
More information about the linux-mtd-cvs
mailing list