Skip to content

Add 64bit rdev APIs#329

Merged
cgwalters merged 1 commit intocomposefs:mainfrom
cgwalters:64dev-t
Sep 6, 2024
Merged

Add 64bit rdev APIs#329
cgwalters merged 1 commit intocomposefs:mainfrom
cgwalters:64dev-t

Conversation

@cgwalters
Copy link
Copy Markdown
Contributor

I stumbled across the fact that on Linux/glibc at least dev_t is 64 bits, but we were truncating it to 32 bits.

Note that the type used in the mkcomposefs binary was already uint64_t but because C happily truncates/converts integers this was missed.

cgwalters added a commit to cgwalters/composefs that referenced this pull request Sep 4, 2024
Pairs with composefs#329
which adapts the C side to properly accept these too.

This breaks semver, we'll need to bump that.

Signed-off-by: Colin Walters <walters@verbum.org>
Copy link
Copy Markdown
Collaborator

@allisonkarlitskaya allisonkarlitskaya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we could use a macro to direct users towards the new variant on recompile, dropping the old declaration from the headers (but keeping it defined to avoid breaking ABI). Would save some churn...

@cgwalters
Copy link
Copy Markdown
Contributor Author

I wonder if we could use a macro to direct users towards the new variant on recompile, dropping the old declaration from the headers (but keeping it defined to avoid breaking ABI). Would save some churn...

But if any callers had been interacting with this via uint32_t (as would be reasonable to do) and they also weren't using -Wconversion they'd not know that they need to take action. I think forcing the churn is the right thing here.

I stumbled across the fact that on Linux/glibc at least `dev_t` is
64 bits, but we were truncating it to 32 bits.

Note that the type used in the `mkcomposefs` binary was already uint64_t
but because C happily truncates/converts integers this was missed.

Signed-off-by: Colin Walters <walters@verbum.org>
Copy link
Copy Markdown
Collaborator

@allisonkarlitskaya allisonkarlitskaya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@cgwalters cgwalters merged commit f8bb72a into composefs:main Sep 6, 2024
allisonkarlitskaya pushed a commit to composefs/composefs-rs that referenced this pull request Nov 7, 2024
Pairs with composefs/composefs#329
which adapts the C side to properly accept these too.

This breaks semver, we'll need to bump that.

Signed-off-by: Colin Walters <walters@verbum.org>
allisonkarlitskaya pushed a commit to composefs/composefs-rs that referenced this pull request Nov 7, 2024
Pairs with composefs/composefs#329
which adapts the C side to properly accept these too.

This breaks semver, we'll need to bump that.

Signed-off-by: Colin Walters <walters@verbum.org>
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.

2 participants