+// This code packs a set of extended tags into a binary structure for NAND storage
+
+// Some of the information is "extra" struff which can be packed in to speed scanning
+// This is defined by having the EXTRA_HEADER_INFO_FLAG set.
+
+
+// Extra flags applied to chunkId
+
+#define EXTRA_HEADER_INFO_FLAG 0x80000000
+#define EXTRA_SHRINK_FLAG 0x40000000
+#define EXTRA_SPARE_FLAGS 0x30000000
+
+#define ALL_EXTRA_FLAGS 0xF0000000
+
+
+
+// Also, the top 4 bits of the object Id are set to the object type.
+#define EXTRA_OBJECT_TYPE_SHIFT (28)
+#define EXTRA_OBJECT_TYPE_MASK ((0x0F) << EXTRA_OBJECT_TYPE_SHIFT)
+
+
+
+static void yaffs_DumpPackedTags2(const yaffs_PackedTags2 *pt)
+{
+ T(YAFFS_TRACE_MTD,(TSTR("packed tags obj %d chunk %d byte %d seq %d"TENDSTR),pt->t.objectId,pt->t.chunkId,pt->t.byteCount,pt->t.sequenceNumber));
+}
+
+static void yaffs_DumpTags2(const yaffs_ExtendedTags *t)
+{
+ T(YAFFS_TRACE_MTD,(TSTR("ext.tags eccres %d blkbad %d chused %d obj %d chunk%d byte %d del %d ser %d seq %d"TENDSTR),
+ t->eccResult, t->blockBad, t->chunkUsed, t->objectId, t->chunkId, t->byteCount, t->chunkDeleted, t->serialNumber, t->sequenceNumber));
+
+}
+
+void yaffs_PackTags2(yaffs_PackedTags2 *pt, const yaffs_ExtendedTags *t)