mirror of
https://github.com/kvcache-ai/AgentENV.git
synced 2026-11-05 01:17:36 +00:00
[PR #420] [MERGED] fix(storage): recognize ZFile layers during sparse-upper detection #422
Labels
No labels
bug
documentation
enhancement
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/AgentENV#422
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/kvcache-ai/AgentENV/pull/420
Author: @guozy18
Created: 10/22/2026
Status: ✅ Merged
Merged: 10/23/2026
Merged by: @yingdi-shan
Base:
main← Head:sync/zfile-layer-detection📝 Commits (1)
75611affix(storage): avoid spurious ZFile and disk size warnings📊 Changes
2 files changed (+31 additions, -14 deletions)
View changed files
📝
storage/overlaybd/src/compression/zfile.rs(+9 -5)📝
storage/overlaybd/src/layer/layer_metadata.rs(+22 -9)📄 Description
What
Recognize a valid ZFile header before parsing an OverlayBD LSMT header when deciding whether a layer is a sparse writable upper.
Why
Compressed layers can be smaller than an LSMT header. Reading a full LSMT header first incorrectly rejects those valid layers or emits misleading diagnostics.
Related issue
N/A — focused correction of existing behavior.
Scope and non-goals
The existing ZFile header verifier and the sparse-upper detection helper.
Design and behavior changes
Share the existing ZFile header validation, read at most one LSMT header, and return false for a valid compressed layer. Raw LSMT layers keep their header validation and sparse flag checks; truncated or invalid inputs still fail.
Compatibility and operations
No API, configuration or storage-format changes. Existing compressed layers become readable by the detector. Ordinary code upgrade/revert; no data migration or new host requirements.
Validation
This branch is based directly on upstream main
a97473band contains one feature commit with no unmerged PR dependencies.Rust checks ran on Linux as a non-root user. The temporary reproducer was removed and is not part of the commit. Full KVM/OSS E2E was not run.
Risks and reviewer notes
The two OverlayBD file patches are preserved from the original commit. Its ublk warning-to-debug hunk is inapplicable because upstream rejects disallowed shrinking instead of warning; that rejection remains intact. Original author guozhengyan maps to guozy18, so no duplicate self-co-author trailer was added.
Checklist
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.