1 Star 0 Fork 17

josephhz/e2fsprogs

forked from src-anolis-os/e2fsprogs 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0007-ext2fs-fix-ABI-change-in-the-struct_ext2_filsys-stru.patch 1.44 KB
一键复制 编辑 原始数据 按行查看 历史
josephhz 提交于 2022-08-15 11:03 . support ext4 fast commit
From 683f177441d8624c7cfcc3c05a2d6dfe484177ca Mon Sep 17 00:00:00 2001
From: Lukas Czerner <[email protected]>
Date: Tue, 14 Jan 2020 20:56:41 +0100
Subject: [PATCH 07/10] ext2fs: fix ABI change in the struct_ext2_filsys
structure
Upstream increased size of the struct_ext2_filsys structure by adding
new encoding member. However this represents ABI breakage within a major
RHEL release. To avoid it use some of the reserved space in the
struct_ext2_filsys structure.
Signed-off-by: Lukas Czerner <[email protected]>
Signed-off-by: Joseph Qi <[email protected]>
---
lib/ext2fs/ext2fs.h | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/lib/ext2fs/ext2fs.h b/lib/ext2fs/ext2fs.h
index f6cccd0c..e917a7e0 100644
--- a/lib/ext2fs/ext2fs.h
+++ b/lib/ext2fs/ext2fs.h
@@ -257,10 +257,17 @@ struct struct_ext2_filsys {
int cluster_ratio_bits;
__u16 default_bitmap_type;
__u16 pad;
+
+ /*
+ * RedHat specific change to prevent ABI change by using 8
+ * reserved bytes
+ */
+ const struct ext2fs_nls_table *encoding;
+
/*
* Reserved for future expansion
*/
- __u32 reserved[5];
+ __u32 reserved[5 - (sizeof(long int)/4)];
/*
* Reserved for the use of the calling application.
@@ -311,8 +318,6 @@ struct struct_ext2_filsys {
/* hashmap for SHA of data blocks */
struct ext2fs_hashmap* block_sha_map;
-
- const struct ext2fs_nls_table *encoding;
};
#if EXT2_FLAT_INCLUDES
--
2.24.4
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/josephhz/e2fsprogs.git
[email protected]:josephhz/e2fsprogs.git
josephhz
e2fsprogs
e2fsprogs
a8

搜索帮助