diff mbox

[08/37] mke2fs: set gdt csum when creating packed fs

Message ID 20140501231315.31890.10293.stgit@birch.djwong.org
State Accepted, archived
Headers show

Commit Message

Darrick Wong May 1, 2014, 11:13 p.m. UTC
When we're creating a fs with metadata blocks packed at the beginning
(packed_meta_blocks=1 in mke2fs.conf), set the group descriptor
checksum or else we create DOA filesystems with checksum errors.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 misc/mke2fs.c |    1 +
 1 file changed, 1 insertion(+)



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

Comments

Lukas Czerner May 2, 2014, 11:55 a.m. UTC | #1
On Thu, 1 May 2014, Darrick J. Wong wrote:

> Date: Thu, 01 May 2014 16:13:15 -0700
> From: Darrick J. Wong <darrick.wong@oracle.com>
> To: tytso@mit.edu, darrick.wong@oracle.com
> Cc: linux-ext4@vger.kernel.org
> Subject: [PATCH 08/37] mke2fs: set gdt csum when creating packed fs
> 
> When we're creating a fs with metadata blocks packed at the beginning
> (packed_meta_blocks=1 in mke2fs.conf), set the group descriptor
> checksum or else we create DOA filesystems with checksum errors.

Makes sense. Thanks!

Reviewed-by: Lukas Czerner <lczerner@redhat.com>

> 
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> ---
>  misc/mke2fs.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> 
> diff --git a/misc/mke2fs.c b/misc/mke2fs.c
> index 6507d0d..fd6259d 100644
> --- a/misc/mke2fs.c
> +++ b/misc/mke2fs.c
> @@ -383,6 +383,7 @@ static errcode_t packed_allocate_tables(ext2_filsys fs)
>  		ext2fs_block_alloc_stats_range(fs, goal,
>  					       fs->inode_blocks_per_group, +1);
>  		ext2fs_inode_table_loc_set(fs, i, goal);
> +		ext2fs_group_desc_csum_set(fs, i);
>  	}
>  	return 0;
>  }
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Theodore Ts'o May 12, 2014, 4:22 a.m. UTC | #2
On Fri, May 02, 2014 at 01:55:59PM +0200, Lukáš Czerner wrote:
> On Thu, 1 May 2014, Darrick J. Wong wrote:
> 
> > Date: Thu, 01 May 2014 16:13:15 -0700
> > From: Darrick J. Wong <darrick.wong@oracle.com>
> > To: tytso@mit.edu, darrick.wong@oracle.com
> > Cc: linux-ext4@vger.kernel.org
> > Subject: [PATCH 08/37] mke2fs: set gdt csum when creating packed fs
> > 
> > When we're creating a fs with metadata blocks packed at the beginning
> > (packed_meta_blocks=1 in mke2fs.conf), set the group descriptor
> > checksum or else we create DOA filesystems with checksum errors.
> 
> Makes sense. Thanks!
> 
> Reviewed-by: Lukas Czerner <lczerner@redhat.com>

Thanks, applied.

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

Patch

diff --git a/misc/mke2fs.c b/misc/mke2fs.c
index 6507d0d..fd6259d 100644
--- a/misc/mke2fs.c
+++ b/misc/mke2fs.c
@@ -383,6 +383,7 @@  static errcode_t packed_allocate_tables(ext2_filsys fs)
 		ext2fs_block_alloc_stats_range(fs, goal,
 					       fs->inode_blocks_per_group, +1);
 		ext2fs_inode_table_loc_set(fs, i, goal);
+		ext2fs_group_desc_csum_set(fs, i);
 	}
 	return 0;
 }