Skip to content

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