Skip to content

Conversation

@raltnoeder
Copy link
Member

This adds a macro defining the maximum length of resource names. I would have preferred a constant of type size_t, but everything else in this file is a macro, so I used one too for consistency.

There did not seem to be any explicit limit on the length of resource names in the kernel module, other than whatever space is left in the netlink messages for the corresponding field (but I did not search too thorougly, so maybe I'm wrong...).
Anyhow, this explicit limit of 127 bytes is the de facto limit of the new-resource command in the drbdsetup utility, since any longer name causes a failed assertion in drbdsetup.
As a result, it should be reasonably safe to conclude that longer names are not used in production anywhere, and establishing an explicit limit of 127 bytes in the kernel module will not break any existing installations.

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