mirror of
https://github.com/openharmony/third_party_e2fsprogs.git
synced 2026-07-01 04:17:47 -04:00
!123 merge master into master
blkid: Resolve blkid is not recognized when cluter set too large for Created-by: jiangqianrong Commit-by: jiangqianrong Merged-by: openharmony_ci Description: ### 一、内容说明(相关的Issue) https://gitcode.com/openharmony/third_party_e2fsprogs/issues/79 ### 二、建议测试周期和提测地址 建议测试完成时间:xxxx.xx.xx 投产上线时间:xxxx.xx.xx 提测地址:CI环境/压测环境 测试账号: ### 三、变更内容 * 3.1 关联PR列表 * 3.2 数据库和部署说明 1. 常规更新 2. 重启unicorn 3. 重启sidekiq 4. 迁移任务:是否有迁移任务,没有写 "无" 5. rake脚本:`bundle exec xxx RAILS_ENV = production`;没有写 "无" * 3.4 其他技术优化内容(做了什么,变更了什么) - 重构了 xxxx 代码 - xxxx 算法优化 * 3.5 废弃通知(什么字段、方法弃用?) * 3.6 后向不兼容变更(是否有无法向后兼容的变更?) ### 四、研发自测点(自测哪些?冒烟用例全部自测?) 自测测试结论: ### 五、测试关注点(需要提醒QA重点关注的、可能会忽略的地方) 检查点: | 需求名称 | 是否影响xx公共模块 | 是否需要xx功能 | 需求升级是否依赖其他子产品 | |------|------------|----------|---------------| | xxx | 否 | 需要 | 不需要 | | | | | | 接口测试: 性能测试: 并发测试: 其他: See merge request: openharmony/third_party_e2fsprogs!123
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
From 211ecdaae8b7e279361080443d42aba2a8c97f3d Mon Sep 17 00:00:00 2001
|
||||
From: j30053360 <jiangqianrong1@huawei.com>
|
||||
Date: Mon, 27 Oct 2025 17:43:31 +0800
|
||||
Subject: [PATCH] Blkid: Enlarge cluster for ntfs
|
||||
|
||||
---
|
||||
lib/blkid/probe.c | 19 ++++++++++++++++++-
|
||||
1 file changed, 18 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/blkid/probe.c b/lib/blkid/probe.c
|
||||
index 6a3bb247..faac82de 100644
|
||||
--- a/lib/blkid/probe.c
|
||||
+++ b/lib/blkid/probe.c
|
||||
@@ -700,7 +700,24 @@ static int probe_ntfs(struct blkid_probe *probe,
|
||||
|
||||
bytes_per_sector = ns->bios_parameter_block[0] +
|
||||
(ns->bios_parameter_block[1] << 8);
|
||||
- sectors_per_cluster = ns->bios_parameter_block[2];
|
||||
+
|
||||
+ switch (ns->bios_parameter_block[2]) {
|
||||
+ case 1:
|
||||
+ case 2:
|
||||
+ case 4:
|
||||
+ case 8:
|
||||
+ case 16:
|
||||
+ case 32:
|
||||
+ case 64:
|
||||
+ case 128:
|
||||
+ sectors_per_cluster = ns->bios_parameter_block[2];
|
||||
+ break;
|
||||
+ default:
|
||||
+ if ((ns->bios_parameter_block[2] < 240)
|
||||
+ || (ns->bios_parameter_block[2] > 249))
|
||||
+ return 1;
|
||||
+ sectors_per_cluster = 1 << (256 - ns->bios_parameter_block[2]);
|
||||
+ }
|
||||
|
||||
if ((bytes_per_sector < 512) || (sectors_per_cluster == 0))
|
||||
return 1;
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -24,5 +24,6 @@ patch -p1 < $2/1004-modify-code-to-compile.patch --fuzz=0 --no-backup-if-mismatc
|
||||
patch -p1 < $2/1005-read-vfat-chinese-label.patch --fuzz=0 --no-backup-if-mismatch
|
||||
patch -p1 < $2/1006-add-hmfs-for-blkid.patch --fuzz=0 --no-backup-if-mismatch
|
||||
patch -p1 < $2/1007-blkid-support-skip-specified-filesystem.patch --fuzz=0 --no-backup-if-mismatch
|
||||
patch -p1 < $2/1008-blkid-enlarge-cluster-for-ntfs.patch --fuzz=0 --no-backup-if-mismatch
|
||||
exit 0
|
||||
)200>test.lock
|
||||
|
||||
Reference in New Issue
Block a user