diff mbox series

[RFCv1,19/72] libext2fs: Misc fixes for struct_ext2_filsys

Message ID d9c1ee96a026bfa4652e1c57d7c7dc40bdf049df.1667822611.git.ritesh.list@gmail.com
State Under Review
Delegated to: Theodore Ts'o
Headers show
Series e2fsprogs: Parallel fsck support | expand

Commit Message

Ritesh Harjani (IBM) Nov. 7, 2022, 12:21 p.m. UTC
From: Andreas Dilger <adilger@whamcloud.com>

Move ext2_filsys fs_num_threads to fit into the __u16 "pad" field
to avoid consuming one of the few remaining __u32 reserved fields.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
---
 lib/ext2fs/ext2fs.h | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Andreas Dilger Dec. 14, 2022, 9:22 p.m. UTC | #1
On Nov 7, 2022, at 5:21 AM, Ritesh Harjani (IBM) <ritesh.list@gmail.com> wrote:
> 
> From: Andreas Dilger <adilger@whamcloud.com>
> 
> Move ext2_filsys fs_num_threads to fit into the __u16 "pad" field
> to avoid consuming one of the few remaining __u32 reserved fields.

This should be merged into the previous patch.

> Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
> Signed-off-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
> ---
> lib/ext2fs/ext2fs.h | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/lib/ext2fs/ext2fs.h b/lib/ext2fs/ext2fs.h
> index 6b4926ce..950ab042 100644
> --- a/lib/ext2fs/ext2fs.h
> +++ b/lib/ext2fs/ext2fs.h
> @@ -278,12 +278,11 @@ struct struct_ext2_filsys {
> 	time_t				now;
> 	int				cluster_ratio_bits;
> 	__u16				default_bitmap_type;
> -	__u16				pad;
> -	__u32				fs_num_threads;
> +	__u16				fs_num_threads;
> 	/*
> 	 * Reserved for future expansion
> 	 */
> -	__u32				reserved[4];
> +	__u32				reserved[5];
> 
> 	/*
> 	 * Reserved for the use of the calling application.
> --
> 2.37.3
> 


Cheers, Andreas
diff mbox series

Patch

diff --git a/lib/ext2fs/ext2fs.h b/lib/ext2fs/ext2fs.h
index 6b4926ce..950ab042 100644
--- a/lib/ext2fs/ext2fs.h
+++ b/lib/ext2fs/ext2fs.h
@@ -278,12 +278,11 @@  struct struct_ext2_filsys {
 	time_t				now;
 	int				cluster_ratio_bits;
 	__u16				default_bitmap_type;
-	__u16				pad;
-	__u32				fs_num_threads;
+	__u16				fs_num_threads;
 	/*
 	 * Reserved for future expansion
 	 */
-	__u32				reserved[4];
+	__u32				reserved[5];
 
 	/*
 	 * Reserved for the use of the calling application.