[Cluster-devel] gfs2 on-disk headers in user space

Andrew Price anprice at redhat.com
Fri Sep 11 11:57:13 UTC 2015


On 11/09/15 12:40, Andreas Grünbacher wrote:
> 2015-09-11 13:28 GMT+02:00 Andrew Price <anprice at redhat.com>:
>> That makes sense to me. I assume we would remove the #include
>> <linux/types.h> from gfs2_ondisk.h and replace it with our own user space
>> types header. I'm worried about clashes using the kernel type names though,
>> so we might need to process the header somehow to change them.
>
> We could substitute the __beX types with uintX_t on import; also we
> could warn if the system header exists but in a different version than
> what's "cached" in gfs2-utils.

That sounds like a good direction to go, but it would be good to keep 
big-endian types separate from native-endian types with __bitwise so 
that mixing endianness will be picked up by a static checker. I believe 
that was Steve's main concern last time we discussed this.

Andy




More information about the Cluster-devel mailing list