fix_label_cache #161
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "fix_label_cache"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
Summary
ogCreatePartitions: añadidoname="CACHE"en la entrada sfdiskpara particiones de caché en discos GPT, alineando el comportamiento con
ogCreateCache(CacheLib) que siempre ha incluido ese campo.Problema
Desde la versión 1.10.5,
ogCreatePartitionses quien crea la partición decaché (antes lo hacía
ogCreateCacheviainitCache).ogCreateCachesiempreincluía
name="CACHE"en su línea sfdisk para GPT, lo que permite aogFindCache()localizar la partición víablkid -t PARTLABEL=CACHEinclusoantes de que esté formateada.
ogCreatePartitionsno lo hacía.En discos GPT completamente nuevos (sin caché previa), el flujo fallaba así:
ogCreatePartitionscrea la caché correctamente al final del disco (sfdisk ✓)initCachees llamado para formatearlaogFindCache()→None(sinPARTLABEL, sin filesystem, sin tipo MSDOS0xCA)ogGetCacheSize()→0→initCacheconcluye que debe recrear la particiónogCreateCachela calcula en la posición justo después de la partición anteriorFailed to add #N partition: Numerical result out of rangeEn discos con una caché ya existente de ejecuciones anteriores el bug no se
manifestaba porque el
PARTLABEL=CACHEya estaba establecido.Solución
Tras sfdisk + partprobe, blkid -t PARTLABEL=CACHE localiza la partición
inmediatamente, ogFindCache() devuelve el slot correcto y initCache solo
necesita formatearla y montarla.