Blame SOURCES/e2fsprogs-1.45.6-ext2fs-fix-ABI-change-in-the-struct_ext2_filsys-stru.patch

0fba97
From 9039cf5c5da439f6c65435c0a2b9ae16989940e1 Mon Sep 17 00:00:00 2001
a9c310
From: Lukas Czerner <lczerner@redhat.com>
a9c310
Date: Tue, 14 Jan 2020 20:56:41 +0100
0fba97
Subject: [PATCH 7/7] ext2fs: fix ABI change in the struct_ext2_filsys
0fba97
 structure
a9c310
a9c310
Upstream increased size of the struct_ext2_filsys structure by adding
a9c310
new encoding member. However this represents ABI breakage within a major
a9c310
RHEL release. To avoid it use some of the reserved space in the
a9c310
struct_ext2_filsys structure.
a9c310
a9c310
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
a9c310
---
a9c310
 lib/ext2fs/ext2fs.h | 11 ++++++++---
a9c310
 1 file changed, 8 insertions(+), 3 deletions(-)
a9c310
a9c310
diff --git a/lib/ext2fs/ext2fs.h b/lib/ext2fs/ext2fs.h
0fba97
index ba83534c..32c75171 100644
a9c310
--- a/lib/ext2fs/ext2fs.h
a9c310
+++ b/lib/ext2fs/ext2fs.h
a9c310
@@ -250,10 +250,17 @@ struct struct_ext2_filsys {
a9c310
 	int				cluster_ratio_bits;
a9c310
 	__u16				default_bitmap_type;
a9c310
 	__u16				pad;
a9c310
+
a9c310
+	/*
a9c310
+	 * RedHat specific change to prevent ABI change by using 8
a9c310
+	 * reserved bytes
a9c310
+	 */
a9c310
+	const struct ext2fs_nls_table *encoding;
a9c310
+
a9c310
 	/*
a9c310
 	 * Reserved for future expansion
a9c310
 	 */
a9c310
-	__u32				reserved[5];
a9c310
+	__u32				reserved[5 - (sizeof(long int)/4)];
a9c310
 
a9c310
 	/*
a9c310
 	 * Reserved for the use of the calling application.
a9c310
@@ -304,8 +311,6 @@ struct struct_ext2_filsys {
a9c310
 
a9c310
 	/* hashmap for SHA of data blocks */
a9c310
 	struct ext2fs_hashmap* block_sha_map;
a9c310
-
a9c310
-	const struct ext2fs_nls_table *encoding;
a9c310
 };
a9c310
 
a9c310
 #if EXT2_FLAT_INCLUDES
a9c310
-- 
0fba97
2.21.3
a9c310