On Wed, 24 Sept 2025 at 12:27, Eric Biggers ebiggers@kernel.org wrote:
u32 more:1,
merge:1,
enc:1,
write:1,
init:1;
bool more;
bool merge;
bool enc;
bool write;
bool init;
This actually packs horribly, since a 'bool' will take up a byte for each, so now those five bits take up 8 bytes of storage (because the five bytes will then cause the next field to have to be aligned too).
You could just keep the bitfield format, but change the 'u32' to 'bool' and get the best of both worlds, ie just do something like
- u32 more:1, + bool more:1,
and now you get the bit packing _and_ the automatic bool behavior.
Linus