linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH 1/8] e2fsprogs: Next3 on-disk format changes
@ 2010-06-21 18:32 Andreas Dilger
  2010-06-22  9:47 ` Amir G.
  0 siblings, 1 reply; 4+ messages in thread
From: Andreas Dilger @ 2010-06-21 18:32 UTC (permalink / raw)
  To: Amir Goldstein; +Cc: linux-ext4@vger.kernel.org development

Amir Goldstein <amir73il@users.sf.net> wrote on 2010-05-05 18:28:49:
> @@ -113,6 +113,11 @@ static struct field_set_info super_fields[] = {
>  	{ "journal_inum", &set_sb.s_journal_inum, 4, parse_uint },
>  	{ "journal_dev", &set_sb.s_journal_dev, 4, parse_uint },
>  	{ "last_orphan", &set_sb.s_last_orphan, 4, parse_uint },
> +	{ "snapshot_inum", &set_sb.s_snapshot_inum, 4, parse_uint },
> +	{ "snapshot_id", &set_sb.s_snapshot_id, 4, parse_uint },
> +	{ "snapshot_r_blocks_count", &set_sb.s_snapshot_r_blocks_count,
> +		4, parse_uint },
> +	{ "snapshot_list", &set_sb.s_snapshot_list, 4, parse_uint },
>  	{ "hash_seed", &set_sb.s_hash_seed, 16, parse_uuid },
>  	{ "def_hash_version", &set_sb.s_def_hash_version, 1, parse_hashalg },
>  	{ "jnl_backup_type", &set_sb.s_jnl_backup_type, 1, parse_uint },


These should be added into the array in superblock offset order, rather than into the middle of the array.

> @@ -29,6 +29,8 @@ static struct feature feature_list[] = {
>  			"dir_prealloc" },
>  	{	E2P_FEATURE_COMPAT, EXT3_FEATURE_COMPAT_HAS_JOURNAL,
>  			"has_journal" },
> +	{	E2P_FEATURE_COMPAT, NEXT3_FEATURE_COMPAT_BIG_JOURNAL,
> +			"big_journal" },
>  	{	E2P_FEATURE_COMPAT, EXT2_FEATURE_COMPAT_IMAGIC_INODES,
>  			"imagic_inodes" },
>  	{	E2P_FEATURE_COMPAT, EXT2_FEATURE_COMPAT_EXT_ATTR,

These should be added into the array in feature number order, rather than into the middle of the array.

> @@ -37,6 +39,8 @@ static struct feature feature_list[] = {
>  			"dir_index" },
>  	{	E2P_FEATURE_COMPAT, EXT2_FEATURE_COMPAT_RESIZE_INODE,
>  			"resize_inode" },
> +	{	E2P_FEATURE_COMPAT, NEXT3_FEATURE_COMPAT_EXCLUDE_INODE,
> +			"exclude_inode" },
>  	{	E2P_FEATURE_COMPAT, EXT2_FEATURE_COMPAT_LAZY_BG,
>  			"lazy_bg" },

Same.
 
> @@ -44,6 +48,14 @@ static struct feature feature_list[] = {
>  			"sparse_super" },
>  	{	E2P_FEATURE_RO_INCOMPAT, EXT2_FEATURE_RO_COMPAT_LARGE_FILE,
>  			"large_file" },
> +	{	E2P_FEATURE_RO_INCOMPAT, NEXT3_FEATURE_RO_COMPAT_HAS_SNAPSHOT,
> +			"has_snapshot" },
> +	{	E2P_FEATURE_RO_INCOMPAT, NEXT3_FEATURE_RO_COMPAT_IS_SNAPSHOT,
> +			"is_snapshot" },
> +	{	E2P_FEATURE_RO_INCOMPAT, NEXT3_FEATURE_RO_COMPAT_FIX_SNAPSHOT,
> +			"fix_snapshot" },
> +	{	E2P_FEATURE_RO_INCOMPAT, NEXT3_FEATURE_RO_COMPAT_FIX_EXCLUDE,
> +			"fix_exclude" },
>  	{	E2P_FEATURE_RO_INCOMPAT, EXT4_FEATURE_RO_COMPAT_HUGE_FILE,
>  			"huge_file" },
>  	{	E2P_FEATURE_RO_INCOMPAT, EXT4_FEATURE_RO_COMPAT_GDT_CSUM,

Same


> @@ -144,7 +144,8 @@ struct ext2_group_desc
>  	__u16	bg_free_inodes_count;	/* Free inodes count */
>  	__u16	bg_used_dirs_count;	/* Directories count */
>  	__u16	bg_flags;
> -	__u32	bg_reserved
> [2]
> ;
> +	__u32	bg_exclude_bitmap;	/* Exclude bitmap block */
> +	__u32	bg_cow_bitmap;		/* COW bitmap block of last snapshot */

These two fields were intended to hold the 32-bit checksum of the inode and block bitmaps for this group.  Also, a 32-bit block number is not sufficient for a filesystem larger than 2^32 blocks, and there is no way to extend this in the future to hold the full block number.

> @@ -426,14 +427,14 @@ struct ext2_inode_large {
> -#define i_reserved1	osd1.linux1.l_i_reserved1
> +#define i_next_snapshot	osd1.linux1.l_i_version

This field is already in use by NFS and Lustre, I don't think it is correct to re-use it.

> @@ -638,6 +648,10 @@ struct ext2_super_block {
>  #define EXT4_FEATURE_RO_COMPAT_GDT_CSUM		0x0010
>  #define EXT4_FEATURE_RO_COMPAT_DIR_NLINK	0x0020
>  #define EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE	0x0040
> +#define NEXT3_FEATURE_RO_COMPAT_HAS_SNAPSHOT	0x1000 /* Next3 has snapshots */
> +#define NEXT3_FEATURE_RO_COMPAT_IS_SNAPSHOT	0x2000 /* Is a snapshot image */
> +#define NEXT3_FEATURE_RO_COMPAT_FIX_SNAPSHOT	0x4000 /* Corrupted snapshot */
> +#define NEXT3_FEATURE_RO_COMPAT_FIX_EXCLUDE	0x8000 /* Bad exclude bitmap */

Are all of these states mutually exclusive?  Can they legally all be set at the same time?


Cheers, Andreas


^ permalink raw reply	[flat|nested] 4+ messages in thread
* [PATCHSET] e2fsprogs: Next3 patch series
@ 2010-05-05 18:28 Amir Goldstein
  2010-05-05 18:28 ` [PATCH 1/8] e2fsprogs: Next3 on-disk format changes Amir Goldstein
  0 siblings, 1 reply; 4+ messages in thread
From: Amir Goldstein @ 2010-05-05 18:28 UTC (permalink / raw)
  To: Theodore Tso; +Cc: linux-ext4

Hi Ted,

The following patch series applies to latest e2fsprogs git tree.
Please let me know what you think about these changes in general
and more specifically, what do you think about accepting the
Next3 on-disk format and features to e2fsprogs?

Thanks,
Amir.

[PATCH 1/8] e2fsprogs: Next3 on-disk format changes.
[PATCH 2/8] e2fsprogs: Add big_journal feature for Next3.
[PATCH 3/8] e2fsprogs: Add exclude_inode feature for Next3.
[PATCH 4/8] e2fsprogs: Next3 snapshot control with chattr/lsattr -X.
[PATCH 5/8] e2fsprogs: Add has_snapshot feature for Next3.
[PATCH 6/8] e2fsprogs: Cleanup Next3 snapshot list when removing has_snapshot feature.
[PATCH 7/8] e2fsprogs: Check Next3 exclude bitmap on fsck.
[PATCH 8/8] e2fsprogs: Dump Next3 message buffer on fsck.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-06-23  4:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-21 18:32 [PATCH 1/8] e2fsprogs: Next3 on-disk format changes Andreas Dilger
2010-06-22  9:47 ` Amir G.
     [not found]   ` <993280B6-32DB-4ABC-86B6-0CFCA9BECCFD@dilger.ca>
2010-06-23  4:16     ` Amir G.
  -- strict thread matches above, loose matches on Subject: below --
2010-05-05 18:28 [PATCHSET] e2fsprogs: Next3 patch series Amir Goldstein
2010-05-05 18:28 ` [PATCH 1/8] e2fsprogs: Next3 on-disk format changes Amir Goldstein

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).