Skip to content

Conversation

@xinyangge
Copy link

The SegmentMapping struct's tag field was 8-bit, limiting overlaybd to 255 stacked layers. This change extends the tag to 16-bit by borrowing 8 bits from moffset (55->47 bits), which still allows 64 PB per layer file - far exceeding practical needs.

Changes:

  • index.h: Change tag from uint8_t to uint16_t, moffset from 55 to 47 bits
  • file.h: Update MAX_STACK_LAYERS from 255 to 65535
  • file.cpp: Update m_rw_tag, min_tag, warp_file_tag types to uint16_t
  • index.cpp: Update ro_index_count parameter and merge limit to 65535
  • config.h: Update MAX_LAYER_CNT from 256 to 65536

Note: This is a breaking change - layers created with this version are not compatible with older overlaybd versions.

🤖 Generated with Claude Code

What this PR does / why we need it:

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

Please check the following list:

  • Does the affected code have corresponding tests, e.g. unit test, E2E test?
  • Does this change require a documentation update?
  • Does this introduce breaking changes that would require an announcement or bumping the major version?
  • Do all new files have an appropriate license header?

The SegmentMapping struct's tag field was 8-bit, limiting overlaybd to
255 stacked layers. This change extends the tag to 16-bit by borrowing
8 bits from moffset (55->47 bits), which still allows 64 PB per layer
file - far exceeding practical needs.

Changes:
- index.h: Change tag from uint8_t to uint16_t, moffset from 55 to 47 bits
- file.h: Update MAX_STACK_LAYERS from 255 to 65535
- file.cpp: Update m_rw_tag, min_tag, warp_file_tag types to uint16_t
- index.cpp: Update ro_index_count parameter and merge limit to 65535
- config.h: Update MAX_LAYER_CNT from 256 to 65536

Note: This is a breaking change - layers created with this version
are not compatible with older overlaybd versions.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
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