Repository navigation
fix: cap mkfs progress at 96% with hint for large disks - #50
tianming-1996 wants to merge 2 commits into
Conversation
1. Root cause: mkfs (fast format) simulates progress with fixed-rate increment (0.06/300ms), capping at 0.99 in ~5 seconds; large disk mkfs.ext3 takes minutes, leaving progress stuck at 99% 2. Fix: cap simulated progress at 0.95 instead of 0.99, add hint text "Creating file system, large capacity disks may take longer, please wait..." when progress caps; completed signal chain unchanged 3. Impact: only mkfs format path affected; erase format path and completion signal chain remain unchanged Log: Cap mkfs simulated progress at 95% and add waiting hint text Influence: 1. Test mkfs format on small disk (progress should complete normally) 2. Test mkfs format on large disk (progress caps at 95% with hint) 3. Verify erase format path is unaffected fix: mkfs 模拟进度上限改为 95% 并添加大容量磁盘提示 1. 根因:mkfs(快速格式化)使用固定速率(0.06/300ms)模拟进度,约 5 秒到达 0.99 上限;大容量磁盘 mkfs.ext3 耗时数分钟,进度卡在 99% 2. 方案:将模拟进度上限从 0.99 改为 0.95,进度停住时显示提示文字 "正在创建文件系统,大容量磁盘可能需要较长时间,请耐心等待...", 不改变 completed 信号链路 3. 影响:仅影响 mkfs 格式化路径;erase 格式化路径和完成信号链路不变 Log: mkfs 模拟进度上限改为 95% 并添加大容量磁盘等待提示 Influence: 1. 测试小容量磁盘 mkfs 格式化(进度正常完成) 2. 测试大容量磁盘 mkfs 格式化(进度停在 95% 并显示提示) 3. 验证 erase 格式化路径不受影响 PMS: BUG-291279
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: tianming-1996 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Reviewer's GuidePrevents large-disk EXT3 formatting from appearing stuck at 99% by stopping simulated progress at 95% and showing a localized wait hint, while leaving completion handling unchanged. Sequence diagram for capped filesystem formatting progresssequenceDiagram
participant MainWindow
participant FormatingPage
participant ProgressTimer
participant DUDisksJob
MainWindow->>ProgressTimer: start(300)
loop simulated progress
ProgressTimer->>MainWindow: timeout()
MainWindow->>FormatingPage: setProgress(0.95)
MainWindow->>FormatingPage: setHintText(tr(...))
end
DUDisksJob-->>MainWindow: completed
MainWindow->>FormatingPage: setProgress(1)
MainWindow->>MainWindow: onFormatingFinished
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
CLA Assistant Lite bot: deepin seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. |
1. Root cause: mkfs (fast format) simulates progress with fixed-rate increment (0.06/300ms), capping at 0.99 in ~5 seconds; large disk mkfs.ext3 takes minutes, leaving progress stuck at 99% 2. Fix: cap simulated progress at 0.96 instead of 0.99, add hint text "Creating file system, large capacity disks may take longer, please wait..." when progress caps; stop timer after capping to avoid repeated setHintText() calls; update SPDX copyright year to 2026; update .ts translation template with new string 3. Impact: only mkfs format path affected; erase format path and completion signal chain remain unchanged Log: Cap mkfs simulated progress at 96% and add waiting hint text Influence: 1. Test mkfs format on small disk (progress should complete normally) 2. Test mkfs format on large disk (progress caps at 96% with hint) 3. Verify erase format path is unaffected fix: mkfs 模拟进度上限改为 96% 并添加大容量磁盘提示 1. 根因:mkfs(快速格式化)使用固定速率(0.06/300ms)模拟进度,约 5 秒到达 0.99 上限;大容量磁盘 mkfs.ext3 耗时数分钟,进度卡在 99% 2. 方案:将模拟进度上限从 0.99 改为 0.96,进度停住时显示提示文字 "正在创建文件系统,大容量磁盘可能需要较长时间,请耐心等待...", 停止定时器避免重复调用 setHintText();更新 SPDX 版权年份为 2026; 更新 .ts 翻译模板添加新字符串 3. 影响:仅影响 mkfs 格式化路径;erase 格式化路径和完成信号链路不变 Log: mkfs 模拟进度上限改为 96% 并添加大容量磁盘等待提示 Influence: 1. 测试小容量磁盘 mkfs 格式化(进度正常完成) 2. 测试大容量磁盘 mkfs 格式化(进度停在 96% 并显示提示) 3. 验证 erase 格式化路径不受影响 Bug: BUG-291279
0799e68 to
eda9332
Compare
修复:格式化 EXT3 卡在 99% (BUG-291279)
根因
MainWindow::initConnect()中 mkfs(快速格式化)路径使用固定速率模拟进度(0.06/300ms),约 5 秒到达 0.99 上限后停住。大容量磁盘 mkfs.ext3 实际耗时数分钟,进度条长时间卡在 99%,给用户造成"卡死"的错觉。修复方案(方案B)
0.99改为0.95completed信号链路:DUDisksJob::completed→setProgress(1)→onFormatingFinished保持不变改动文件
view/formatingpage.h— 新增QLabel* m_hintLabel成员和setHintText()方法view/formatingpage.cpp— 在initUI()中创建 hint label,实现setHintText()view/mainwindow.cpp—0.99→0.95,新增setHintText()调用验证
PMS
PMS: BUG-291279
Summary by Sourcery
Keep formatting progress below completion and show a wait message while large-disk file-system creation continues.
New Features:
Bug Fixes:
Enhancements: