* exporting uuid_t from uapi/linux/uuid.h
@ 2018-08-21 19:25 Nikolay Borisov
2018-08-22 6:05 ` Christoph Hellwig
0 siblings, 1 reply; 2+ messages in thread
From: Nikolay Borisov @ 2018-08-21 19:25 UTC (permalink / raw)
To: linux-api; +Cc: Ext4 Developers List, linux-btrfs, Ted Ts'o
Hello,
I'm doing some refactoring on btrfs and would like to convert some of
the "naked" definition of UUID in on-disk object to uuid_t. Since those
structs are defined in include/uapi/linux/btrfs_tree.h I naturally would
need to expose the kernel uuid_t to the uapi header via
include/uapi/linux/uuid.h. The uuid was originally unexported in
60927bc31436 ("uuid: remove uuid_be defintions from the uapi header")
but at that time it was called uuid_be. The thing is that btrfs-progs
for example uses both btrfs_tree.h uapi header as well as libuuid. THe
latter also defines uuid_t. Both the kernel one and libuuid are binary
compatible.
So what's the correct way (if any) to expose a kernel type that might
have also been defined by a userspace library?
Regards,
Nikolay
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: exporting uuid_t from uapi/linux/uuid.h
2018-08-21 19:25 exporting uuid_t from uapi/linux/uuid.h Nikolay Borisov
@ 2018-08-22 6:05 ` Christoph Hellwig
0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2018-08-22 6:05 UTC (permalink / raw)
To: Nikolay Borisov
Cc: linux-api, Ext4 Developers List, linux-btrfs, Ted Ts'o
On Tue, Aug 21, 2018 at 10:25:50PM +0300, Nikolay Borisov wrote:
> Hello,
>
> I'm doing some refactoring on btrfs and would like to convert some of
> the "naked" definition of UUID in on-disk object to uuid_t. Since those
> structs are defined in include/uapi/linux/btrfs_tree.h I naturally would
> need to expose the kernel uuid_t to the uapi header via
> include/uapi/linux/uuid.h. The uuid was originally unexported in
> 60927bc31436 ("uuid: remove uuid_be defintions from the uapi header")
> but at that time it was called uuid_be. The thing is that btrfs-progs
> for example uses both btrfs_tree.h uapi header as well as libuuid. THe
> latter also defines uuid_t. Both the kernel one and libuuid are binary
> compatible.
>
> So what's the correct way (if any) to expose a kernel type that might
> have also been defined by a userspace library?
Please just use an raw array of __u8 for your APIs.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-08-22 6:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-21 19:25 exporting uuid_t from uapi/linux/uuid.h Nikolay Borisov
2018-08-22 6:05 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).