Skip to content

feat(io): add initial O_DIRECT write support with dynamic alignment a… #1545

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: staging
Choose a base branch
from

Conversation

NikhilAdhau
Copy link

…nd truncation

  • Introduce first-time support for O_DIRECT file writes
  • Dynamically detect sector size to ensure proper buffer alignment
  • Ensure all O_DIRECT writes use aligned buffers for compatibility
  • Truncate files post-write to match actual data size and remove padding
  • Add tests covering O_DIRECT behavior (padding, empty writes, etc.)
  • Add configuration and YAML flags to enable/disable O_DIRECT

Changes

Fixes

Tests

Tasks to complete before merging PR:

  • Ensure system tests are passing. If not Run them manually to check for any regressions 📋
  • Do any new system tests need added to test this change? do any existing system tests need updated? If so create a PR at 0chain/system_test
  • Merge your system tests PR to master AFTER merging this PR

Associated PRs (Link as appropriate):

  • 0chain:
  • gosdk:
  • system_test:
  • zboxcli:
  • zwalletcli:
  • Other: ...

NikhilAdhau and others added 3 commits July 20, 2025 20:07
…nd truncation

- Introduce first-time support for O_DIRECT file writes
- Dynamically detect sector size to ensure proper buffer alignment
- Ensure all O_DIRECT writes use aligned buffers for compatibility
- Truncate files post-write to match actual data size and remove padding
- Add tests covering O_DIRECT behavior (padding, empty writes, etc.)
- Add configuration and YAML flags to enable/disable O_DIRECT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant