Skip to content

ternblocks: split into few files, add unit-tests, prepare for dynamic blockservice config#119

Open
mcrnic wants to merge 5 commits intomainfrom
ternblocks-refactor
Open

ternblocks: split into few files, add unit-tests, prepare for dynamic blockservice config#119
mcrnic wants to merge 5 commits intomainfrom
ternblocks-refactor

Conversation

@mcrnic
Copy link
Copy Markdown
Collaborator

@mcrnic mcrnic commented Mar 24, 2026

No description provided.

@mcrnic mcrnic added the ci If given to a PR, the PR will run CI checks. label Mar 24, 2026
mcrnic added 5 commits March 26, 2026 19:12
All blocks are now stored with page CRCs. The with_crc subdirectory
level is no longer needed. The blockservice package will handle
migrating existing on-disk data on startup.
…zero-copy fetch

Split block storage operations into a reusable blockservice package:
- BlockService: lifecycle management, write/erase/check/fetch operations
- GetBlockFileForFetch: returns raw *os.File for zero-copy sendfile transfers
- GetBlockReader: CRC-validating reader with optional CRC stripping
- pageCrcReader/pageCrcWriter: page-level CRC32C validation streams
- CGo-based fast block counting via getdents syscall
- One-time with_crc directory migration on startup
- Add blockservice unit tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci If given to a PR, the PR will run CI checks.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant