Thread (1 message) 1 message, 1 author, 2011-12-19

Re: [PATCH 02/51] libext2fs: Change ext4 on-disk layout to support metadata checksumming

From: Darrick J. Wong <hidden>
Date: 2011-12-19 20:18:07

Possibly related (same subject, not in this thread)

On Mon, Dec 19, 2011 at 05:54:23AM +0100, Andreas Dilger wrote:
On 2011-12-14, at 2:13 AM, Darrick J. Wong wrote:
quoted
Define flags and extend ext4 structure definitions to support metadata
checksumming.  Ted T'so covered many of these fields in an earlier patch, but
there are more required changes to the disk layout.
diff --git a/lib/ext2fs/ext2_fs.h b/lib/ext2fs/ext2_fs.h
index 0f8cde8..ce2fd66 100644
--- a/lib/ext2fs/ext2_fs.h
+++ b/lib/ext2fs/ext2_fs.h
@@ -234,6 +234,13 @@ struct ext2_dx_countlimit {
+/*
+ * This goes at the end of each htree block.
+ */
+struct ext2_dx_tail {
+	__u32 reserved;
+	__u32 checksum;	/* crc32c(uuid+inum+dxblock) */
+};
These should have a structure prefix, like "dxt_reserved" and "dxt_checksum"
to make them easier to find with tags.
quoted
 /*
+ * This is a bogus directory entry at the end of each leaf block that
+ * records checksums.
+ */
+struct ext2_dir_entry_tail {
+	__u32	reserved_zero1;		/* Pretend to be unused */
+	__u16	rec_len;		/* 12 */
+	__u16	reserved_name_len;	/* 0xDE00, fake namelen/filetype */
+	__u32	checksum;		/* crc32c(uuid+inode+dirent) */
+};
Similarly, this should get a structure prefix for all of the fields, like
"det_checksum" or similar.
Ok.

--D
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help