chore(i18n): finish translating code comments and scripts to English
CI / Format and clippy (push) Successful in 1m57s
CI / Dependency audit (push) Successful in 13s
CI / Check desktop app (Linux) (push) Successful in 3m54s
CI / Tests (Linux) (push) Failing after 7m25s
Release / Create release (push) Successful in 6s
Release / CLI (linux-aarch64) (push) Successful in 1m48s
Release / CLI (linux-x86_64) (push) Successful in 2m39s
Release / Desktop app (linux-aarch64) (push) Successful in 10m9s
Release / Desktop app (linux-x86_64) (push) Successful in 12m20s
Release / Desktop app (windows) (push) Successful in 7m32s
Release / Build latest.json (push) Successful in 5s
CI / Format and clippy (push) Successful in 1m57s
CI / Dependency audit (push) Successful in 13s
CI / Check desktop app (Linux) (push) Successful in 3m54s
CI / Tests (Linux) (push) Failing after 7m25s
Release / Create release (push) Successful in 6s
Release / CLI (linux-aarch64) (push) Successful in 1m48s
Release / CLI (linux-x86_64) (push) Successful in 2m39s
Release / Desktop app (linux-aarch64) (push) Successful in 10m9s
Release / Desktop app (linux-x86_64) (push) Successful in 12m20s
Release / Desktop app (windows) (push) Successful in 7m32s
Release / Build latest.json (push) Successful in 5s
Completes the English-only standardization for code, comments, scripts and CI templates (UI/CLI-facing strings stay bilingual pt-BR/en, untouched). Covers the remaining crates/, apps/gui/ui/ and apps/gui/src-tauri/ comments, .gitea/ workflow and template comments, .githooks/ hooks, and the scripts/ source comments for the files already renamed in a prior commit (check.sh, generate-logo.py, install-hooks.sh). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VAyr8d7HuAdUGB6aA5xmDD
This commit is contained in:
1 parent
da212e6926
commit
6328220c60
129 files changed
+1961
-1834
No files matched your search
@@ -1,5 +1,5 @@
|
||||
//! RAID por software: arrays gerados por codificadores independentes (faixa a faixa),
|
||||
//! lidos de volta inteiros, degradados e com superblocos md 1.x e 0.90.
|
||||
//! Software RAID tests: arrays built by independent stripe encoders and read back
|
||||
//! intact, degraded, and via Linux `mdadm` v1.x and v0.90 superblocks.
|
||||
|
||||
use guara_core::raid::*;
|
||||
use guara_core::source::{read_vec, MemSource, Source};
|
||||
@@ -39,7 +39,7 @@ fn gpow(k: usize) -> u8 {
|
||||
(0..k).fold(1, |a, _| gmul(a, 2))
|
||||
}
|
||||
|
||||
/// Gera as imagens dos membros de um RAID 5/6 com a paridade na posição pedida.
|
||||
/// Builds member disk buffers for a RAID 5/6 array using the specified parity layout.
|
||||
fn encode_parity(level: Level, layout: Layout, n: usize, logical: &[u8]) -> Vec<Vec<u8>> {
|
||||
let dd = if level == Level::R6 { n - 2 } else { n - 1 };
|
||||
let rows = logical.len() / (C * dd);
|
||||
@@ -54,7 +54,7 @@ fn encode_parity(level: Level, layout: Layout, n: usize, logical: &[u8]) -> Vec<
|
||||
_ => (r, (r + 1) % n),
|
||||
};
|
||||
let sym = matches!(layout, Layout::LeftSymmetric | Layout::RightSymmetric);
|
||||
// ordem dos discos de dados
|
||||
// data disk slot order for this stripe row
|
||||
let order: Vec<usize> = if sym {
|
||||
let start = if level == Level::R6 { qd + 1 } else { pd + 1 };
|
||||
(0..dd).map(|d| (start + d) % n).collect()
|
||||
@@ -110,7 +110,7 @@ fn check(level: Level, layout: Layout, n: usize, missing: &[usize]) {
|
||||
got == logical,
|
||||
"{level:?} {layout:?} n={n} faltando {missing:?}"
|
||||
);
|
||||
// leitura desalinhada
|
||||
// unaligned cross-stripe read
|
||||
let part = read_vec(&r, 5000, 30000).unwrap();
|
||||
assert_eq!(part, &logical[5000..35000]);
|
||||
}
|
||||
@@ -145,7 +145,7 @@ fn raid6_layouts_with_one_and_two_missing() {
|
||||
#[test]
|
||||
fn raid0_raid1_linear_and_raid10_near() {
|
||||
let logical = data(C * 24);
|
||||
// RAID 0 com 3 discos
|
||||
// 3-disk RAID 0
|
||||
let mut imgs = vec![vec![]; 3];
|
||||
for (c, ch) in logical.chunks(C).enumerate() {
|
||||
imgs[c % 3].extend_from_slice(ch);
|
||||
@@ -158,7 +158,7 @@ fn raid0_raid1_linear_and_raid10_near() {
|
||||
))
|
||||
.unwrap();
|
||||
assert_eq!(read_vec(&r, 0, logical.len()).unwrap(), logical);
|
||||
// RAID 1, um membro caído
|
||||
// 2-disk RAID 1 with first mirror missing
|
||||
let m = vec![logical.clone(), logical.clone()];
|
||||
let r = RaidSource::new(RaidParams::simple(
|
||||
Level::R1,
|
||||
@@ -178,7 +178,7 @@ fn raid0_raid1_linear_and_raid10_near() {
|
||||
))
|
||||
.unwrap();
|
||||
assert_eq!(read_vec(&r, 0, logical.len()).unwrap(), logical);
|
||||
// RAID 10 near=2 com 4 discos: slots em sequência.
|
||||
// 4-disk RAID 10 (`near = 2`): sequential slot pairs.
|
||||
let n = 4;
|
||||
let mut imgs = vec![vec![0u8; C * 12]; n];
|
||||
for (c, ch) in logical.chunks(C).enumerate() {
|
||||
@@ -240,11 +240,11 @@ fn assembles_from_md_v12_superblocks_with_a_missing_disk() {
|
||||
let n = 4;
|
||||
let logical = data(C * 3 * 40);
|
||||
let imgs = encode_parity(Level::R5, Layout::LeftSymmetric, n, &logical);
|
||||
let data_off = 2048u64; // 1 MiB em setores
|
||||
let data_off = 2048u64; // 1 MiB in 512-byte sectors
|
||||
let mut members_in = vec![];
|
||||
for (i, im) in imgs.iter().enumerate() {
|
||||
if i == 2 {
|
||||
continue; // disco perdido
|
||||
continue; // simulate missing disk 2
|
||||
}
|
||||
let mut full = vec![0u8; 4096 + (data_off as usize) * 512 + im.len()];
|
||||
let sb = md_v1_super(
|
||||
@@ -260,7 +260,7 @@ fn assembles_from_md_v12_superblocks_with_a_missing_disk() {
|
||||
);
|
||||
full[4096..8192].copy_from_slice(&sb);
|
||||
full[4096 + data_off as usize * 512..][..im.len()].copy_from_slice(im);
|
||||
// o superbloco 1.2 fica a 4 KiB; os dados começam em data_offset a partir do início
|
||||
// mdadm v1.2 superblock sits at 4 KiB; array data starts at `data_offset` sectors
|
||||
let mut real = vec![0u8; data_off as usize * 512 + im.len()];
|
||||
real[4096..8192].copy_from_slice(&sb);
|
||||
real[data_off as usize * 512..].copy_from_slice(im);
|
||||
|
||||
Reference in new issue
Block a user