From: "Artem B. Bityuckiy" <abityuckiy@yandex.ru>
To: David Woodhouse <dwmw2@infradead.org>
Cc: linux-mtd@lists.infradead.org
Subject: Re: inode checkpoints
Date: Mon, 04 Oct 2004 18:18:15 +0400 [thread overview]
Message-ID: <41615BA7.60801@yandex.ru> (raw)
In-Reply-To: <1096895892.30942.614.camel@hades.cambridge.redhat.com>
Of course, ICPs shouldn't contain full node headers, only those
information which is needed for the inode cache creation should be includes.
I'm imaging the following data structures for ICPs...
------------------------------------------------------------
Regular file inode checkpoints (FICP)
------------------------------------------------------------
The FICP are represented by the following structure:
struct jffs2_raw_ficp {
/* standard JFFS2 node header fields */
jint32_t magic;
jint32_t nodetype;
jint32_t totlen;
jint32_t hdr_crc;
jint32_t version; /* the checkpoint version */
jint32_t highest_version; /* the highest version of node,
described by this checkpoint */
jint32_t lowest_version; /* the lowest version of node, described
by this checkpoint */
jint32_t dsize; /* checkpoint's data size in uncompressed form */
jint32_t ino; /* the inode described by this checkpoint */
jint32_t num; /* the number of nodes, described by this checkpoint */
uint8_t compr; /* the checkpoint node data compression type;
standard values are used */
uint8_t unused[3]; /* just padding */
jint32_t data_crc; /* the CRC checksum of the checkpoint data */
jint32_t node_crc; /* the CRC checksum of the checkpoint object
without data */
struct jffs2_raw_ficp_entry data[0]; /* */
};
Each node, described by the FICP is represented by the following
structure (fields are the same as in the jffs2_raw_inode structure).
struct jffs2_raw_ficp_entry {
jint32_t offset; /* the offset in the regular file, to which the
changes which are introduced by this node belong */
jint32_t version; /* the node version */
jint32_t size; /* size of the data belonging to the node (in
uncompressed form) */
};
------------------------------------------------------------
Directory inode checkpoints (DICP)
------------------------------------------------------------
The directory checkpoint is represented by the following structure:
struct jffs2_raw_dicp {
/* standard JFFS2 node header fields */
jint32_t magic;
jint32_t nodetype;
jint32_t totlen;
jint32_t hdr_crc;
jint32_t version; /* the checkpoint version */
jint32_t highest_version; /* the lowest version of the direntry
node, described by this checkpoint */
jint32_t lowest_version; /* the lowest version of the direntry
node, described by this checkpoint */
jint32_t dsize; /* checkpoint's data size in uncompressed form */
jint32_t ino /* the inode number of directory, which is described
by this checkpoint */;
jint32_t num; /* the number of direntry nodes, described by this
checkpoint */
uint8_t compr; /* the checkpoint node data compression type;
standard values are used */
uint8_t unused[3]; /* ust padding */
jint32_t data_crc; /* the CRC checksum of the checkpoint data */
jint32_t node_crc; /* the CRC checksum of the checkpoint object
without data */
struct jffs2_raw_dicp_entry data[0];
};
Each direntry node, described by the directory checkpoint is represented
by the following structure (fields are the same as in the
jffs2_raw_dirent structure).
struct jffs2_raw_dicp_entry {
jint32_t ino; /* the inode number of the target file (i.e., of the
file to which this direntry */
jint32_t version; /* the direntry node version */
uint8_t size; /* the direntry name length */
uint8_t type; /* the type of the target file (the same as the type
field in the struct */
uint8_t name[0] /* the direntry name */
} __attribute__((packed));
----------------------------------------------------
For FICP and DICP new node type identifiers ought to be introduced.
These identifiers are defined as:
#define JFFS2_NODETYPE_FICP \
(JFFS2_FEATURE_RWCOMPAT_DELETE | JFFS2_NODE_ACCURATE | 5)
#define JFFS2_NODETYPE_DICP \
(JFFS2_FEATURE_RWCOMPAT_DELETE | JFFS2_NODE_ACCURATE | 6)
----------------------------------------------------
Comments ?
--
Best Regards,
Artem B. Bityuckiy,
St.-Petersburg, Russia.
next prev parent reply other threads:[~2004-10-04 14:18 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-04 10:14 inode checkpoints Artem Bityuckiy
2004-10-04 10:22 ` David Woodhouse
2004-10-04 10:36 ` [OBORONA-SPAM] " Artem B. Bityuckiy
2004-10-04 12:34 ` Josh Boyer
2004-10-04 13:07 ` Artem B. Bityuckiy
2004-10-04 13:18 ` David Woodhouse
2004-10-04 13:32 ` Artem B. Bityuckiy
2004-10-04 13:46 ` Artem B. Bityuckiy
2004-10-04 14:18 ` Artem B. Bityuckiy [this message]
2004-10-04 14:23 ` David Woodhouse
2004-10-04 15:07 ` Artem B. Bityuckiy
2004-10-05 14:07 ` Artem B. Bityuckiy
2004-10-05 16:45 ` David Woodhouse
2004-10-05 17:20 ` Josh Boyer
2004-10-06 9:07 ` Artem B. Bityuckiy
2004-10-09 11:45 ` Artem B. Bityuckiy
2004-10-09 11:58 ` Artem B. Bityuckiy
2004-10-09 13:01 ` Artem B. Bityuckiy
2004-10-09 14:48 ` Artem B. Bityuckiy
2004-10-09 13:22 ` Artem B. Bityuckiy
2004-10-04 11:44 ` Artem Bityuckiy
2004-10-04 12:36 ` Josh Boyer
2004-10-04 12:43 ` David Woodhouse
2004-10-04 13:26 ` [OBORONA-SPAM] " Artem B. Bityuckiy
2004-10-04 13:39 ` Josh Boyer
2004-10-04 13:56 ` Artem Bityuckiy
2004-10-04 14:06 ` Artem B. Bityuckiy
2004-10-04 14:17 ` Josh Boyer
2004-10-04 14:22 ` Artem B. Bityuckiy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=41615BA7.60801@yandex.ru \
--to=abityuckiy@yandex.ru \
--cc=dwmw2@infradead.org \
--cc=linux-mtd@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox