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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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:
> > 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.
> 
> >  /*
> > + * 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

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux